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

Offline page not working #49

Open
sebastianbenz opened this issue Aug 13, 2019 · 2 comments
Open

Offline page not working #49

sebastianbenz opened this issue Aug 13, 2019 · 2 comments
Assignees

Comments

@sebastianbenz
Copy link
Contributor

The offline page is currently not working for amp.dev. Here is our serviceworker:

importScripts('https://cdn.ampproject.org/sw/amp-sw.js');
AMP_SW.init({
  assetCachingOptions: [{
    regexp: /\.(png|jpg|woff2|woff|css|js)/,
    cachingStrategy: 'CACHE_FIRST',
  }],
  offlinePageOptions: {
    url: '/offline.html',
    assets: [],
  },
});

Steps to reproduce:

  1. visit amp.dev
  2. open DevTools and check if sw is installed and /offline.html is cached
  3. Trigger offline mode in DevTools
  4. Reload the page => works
  5. click a link to an uncached page
    => no offline page is shown
@kristoferbaxter kristoferbaxter self-assigned this Aug 13, 2019
@DerekNonGeneric
Copy link

Once implemented, I feel ampproject/amp.dev#589 will have been addressed as a revision of the SW's implementation will have been made. You all have made a lot of progress towards satisfying Lighthouse's PWA criteria since I filed that issue two years ago. Good work! 👍

@seomaz
Copy link

seomaz commented May 12, 2020

@kristoferbaxter Any update on this ?

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

4 participants