Now make it do something more useful than just saying you're offline.
On a route request, cache the response. If the device becomes offline later, use the cached response if it is less than 1 hour old. A bit of text to say "you're offline" might be helpful here.
I added a service worker! Hurrah!
Now make it do something more useful than just saying you're offline.
On a route request, cache the response. If the device becomes offline later, use the cached response if it is less than 1 hour old. A bit of text to say "you're offline" might be helpful here.