UpUp icon indicating copy to clipboard operation
UpUp copied to clipboard

Consider removing need to explicitly state assets needed

Open TalAter opened this issue 10 years ago • 4 comments
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)

TalAter avatar Sep 04 '15 11:09 TalAter

(I just discovered that the referrer information is available directly as event.request.referrer, in case that makes things easier for you.)

jeffposnick avatar Sep 08 '15 18:09 jeffposnick

Does anyone is working on this?

niltonheck avatar Mar 29 '16 13:03 niltonheck

As far as I know, not yet.

TalAter avatar Mar 29 '16 19:03 TalAter

Great. I'll have a look. ;)

niltonheck avatar Mar 29 '16 19:03 niltonheck