ampproject / ampproject/amp-sw
Offline page not working
Open
- Dominant language
- JavaScript
- Stars
- 70
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
The offline page is currently not working for amp.dev. Here is our [serviceworker](https://amp.dev/serviceworker.js):
```
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
1. open DevTools and check if sw is installed and `/offline.html` is cached
1. Trigger offline mode in DevTools
1. Reload the page => works
1. click a link to an uncached page
=> no offline page is shown
Contributor guide
Assessment
This issue has not been assessed yet.