Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider removing need to explicitly state assets needed #49

Open
TalAter opened this issue Sep 4, 2015 · 4 comments
Open

Consider removing need to explicitly state assets needed #49

TalAter opened this issue Sep 4, 2015 · 4 comments

Comments

@TalAter
Copy link
Owner

TalAter commented Sep 4, 2015

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)
@jeffposnick
Copy link

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

@niltonheck
Copy link

Does anyone is working on this?

@TalAter
Copy link
Owner Author

TalAter commented Mar 29, 2016

As far as I know, not yet.

@niltonheck
Copy link

Great. I'll have a look. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants