FlatTurtle / InfoScreen

FlatTurtle InfoScreen repository v1 (deprecated)
http://flatturtle.com
4 stars 3 forks source link

Internet connectivity #13

Open Tuinslak opened 12 years ago

Tuinslak commented 12 years ago

We need to device to do a hard refresh once every X hours (to pull website updates):

but in case of a loss of internet connectivity (for whatever reason), browser should keep trying every X seconds.

Can we fix this with JS?

get JS to pull new content/html/(and data), and keep working even if there is no internet connectivity at some point ? Prevent a DNS error page on browser

mathiasbynens commented 12 years ago

You could use navigator.onLine and/or the offline and online events for this.

E.g. use an interval (setInterval) to do the hard refresh, and reschedule it in case navigator.onLine is false.

Tuinslak commented 12 years ago

Has this been solved @segersjens ?

Tuinslak commented 12 years ago

@segersjens this isn't fixed: http://botmaster.corp.flatturtle.com/tmp/2012-04-07-141725_1920x1080_scrot.png

We had a 1-2 hours internet issue. NMBS stations gives an error and doesn't fetch new data anymore after internet connectivity is back up.

Tuinslak commented 12 years ago

Same is true for Google maps (compare screenshots after browser restart: http://botmaster.corp.flatturtle.com/tmp/2012-04-07-142414_1920x1080_scrot.png)