Created
March 9, 2025 06:33
-
-
Save jpawlyn/2ddf3b95b2bc74a55b12b73d8cadb66a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const documentsStrategyOptions = { | |
cacheName: `documents-${CACHE_VERSION}`, | |
matchOptions: { ignoreVary: true }, | |
plugins: [ | |
new ExpirationPlugin({ | |
maxEntries: 100 | |
}) | |
] | |
} | |
registerRoute( | |
({ request, url }) => !no_fallback_paths.includes(url.pathname) && (request.destination === 'document' || | |
request.destination === ''), | |
new NetworkFirst(documentsStrategyOptions) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment