mirror of
https://github.com/mastodon/mastodon
synced 2024-11-28 14:58:21 +09:00
Consider only-if-cached in FetchEvent valid on non-Mozilla-Firefox browser (#7506)
This commit is contained in:
parent
4511a10e66
commit
17c1a62ec8
@ -13,7 +13,8 @@ function fetchRoot() {
|
|||||||
return fetch('/', { credentials: 'include' });
|
return fetch('/', { credentials: 'include' });
|
||||||
}
|
}
|
||||||
|
|
||||||
const invalidOnlyIfCached = navigator.userAgent.match(/Firefox\/(\d+)/)[1] < 60;
|
const firefox = navigator.userAgent.match(/Firefox\/(\d+)/);
|
||||||
|
const invalidOnlyIfCached = firefox && firefox[1] < 60;
|
||||||
|
|
||||||
// Cause a new version of a registered Service Worker to replace an existing one
|
// Cause a new version of a registered Service Worker to replace an existing one
|
||||||
// that is already installed, and replace the currently active worker on open pages.
|
// that is already installed, and replace the currently active worker on open pages.
|
||||||
|
Loading…
Reference in New Issue
Block a user