News for hackers. Stuff that matters.
Re:Show HN: HNLive – Hacker News in Real Time by dspillett on Friday January 22, 2016 @06:09AM (#10952051)
For supporting legacy browsers you need to fall back to polling unfortunately.

A better option than repeated requests every X seconds (or X times per second) is long polling (see https://en.wikipedia.org/wiki/Push_technology for brief notes and your preferred search engine for many examples). You can only do this if you control the back-end (so can dictate its API) or the API you are using explicitly supports long polling, of course.

There are a number of libraries out there that try to wrap the different methods into one so you don't have to worry about compatibility, using the more efficient websockets where possible, falling back to long-poll where not, and sometimes other methods in between (integrating a little bit of flash for instance). http://socket.io/ is probably the best know of these.

Re:Show HN: HNLive – Hacker News in Real Time by mchahn on Sunday January 24, 2016 @12:06AM (#10961543)
Server-sent-events are an often overlooked alternative to polling and websockets. They work on all browsers and I'm having good luck using them.
Re:Show HN: HNLive – Hacker News in Real Time by dspillett on Monday January 25, 2016 @04:25AM (#10966298)
I thought that got dropped from "HTML5" and was considered deprecated?

It was never implemented directly in IE or Edge (http://caniuse.com/#feat=eventsource), so when you say "work in all browsers" do you discount IE or can you recommend a good well-supported polyfill?

Re:Show HN: HNLive – Hacker News in Real Time by jondubois on Friday January 22, 2016 @06:56AM (#10952202)
No one cares about legacy browsers except you and your grandma ;p
Re:Show HN: HNLive – Hacker News in Real Time by dspillett on Monday January 25, 2016 @04:20AM (#10966288)
He specifically mentioned compatibility charts, which implies he isn't just looking at supporting the latest and greatest!

In my personal projects I don't care about legacy browsers (to users that far out of date I say "please go be a pain in the side for someone else"), but professionally I'll have to support at least as far back as IE8 for a while yet and I suspect a great many people are in the same position.