We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a627020 commit 0b1adb5Copy full SHA for 0b1adb5
views/service-worker.js.erb
@@ -50,7 +50,7 @@ self.addEventListener('fetch', event => {
50
<%# The index page will make sure the correct documentation or a proper offline page is shown %>
51
const pathname = url.pathname;
52
const filename = pathname.substr(1 + pathname.lastIndexOf('/')).split(/\#|\?/g)[0];
53
- if (url.origin === location.origin && !filename.includes('.')) {
+ if (url.origin === location.origin && !['.css', '.js', '.json', '.png', '.ico', '.svg', '.xml'].some(ext => filename.endsWith(ext))) {
54
const cachedIndex = await caches.match('/');
55
if (cachedIndex) return cachedIndex;
56
}
0 commit comments