0

I'm still a novice website builder, so please go easy on me ...

I am displaying a webpage onto a TV viewable to the public. There is a networked media player behind the TV which plays the webpage, it's not a PC.

The webpage displays regularly updated data which comes from a MySQL database, and I simply use a page refresh to update the webpage. So everything works well, however ... if there is a loss of internet connection, then of course an error appears on the TV when the page refreshes.

Is there a way to remove the page refresh, have a piece of code that will still retrieve the data in the background, and ideally cache that data so that even if there is a loss of internet the TV will still continue to display correctly (even if the data is slightly outdated) ?

Many thanks.

trademark
  • 23
  • 6

1 Answers1

0

Sounds like a job for AJAX. You could also look into service workers.

pucky124
  • 1,489
  • 12
  • 24
  • I don't know anything about service workers, but yes it does seem that perhaps AJAX could provide the solution. Thanks. – trademark Sep 22 '17 at 08:13