ftlabs / big-ft

A view of the FT homepage designed for non-interactive video walls and billboards
23 stars 6 forks source link

Use a service worker for speed and caching #82

Closed AdaRoseCannon closed 8 years ago

AdaRoseCannon commented 8 years ago

One issue: if a big-ft box lost it's connection you wouldn't know.

I'm going to send up the timestamp with the request which will be returned and cached. So we know when the last time a successful request for data was made.

AdaRoseCannon commented 8 years ago

This is not ready for PR but working out a way to store the request timestamp so it can be read later in case a cached result is returned.

I am planning to send it up in the header and the server will echo it back in the header so it gets cached.

The client will then use this to display the correct last updated time.

(I checked the fetch polyfill includes the Headers object :smile: )