UpUp
UpUp copied to clipboard
Consider removing need to explicitly state assets needed
trafficstars
Consider loading offline page in a hidden iframe, and capturing all request from that iframe in Service Worker and cache them.
As suggested by @slightlyoff and @jeffposnick: https://twitter.com/slightlylate/status/638477704724115456
Potential complications:
- ServiceWorker needs to cache just requests that came from the offline page, and not from any other page. Possible solution: event.request.headers.get('referrer')
- Offline page might contain things we do not want to load. e.g. user defines the same page for online and offline. The page contains analytics code. So now every visit to the page would count as two (page + iframe)
(I just discovered that the referrer information is available directly as event.request.referrer, in case that makes things easier for you.)
Does anyone is working on this?
As far as I know, not yet.
Great. I'll have a look. ;)