Skip to content

Commit

Permalink
Update service worker to prefetch additional fonts and increase cache…
Browse files Browse the repository at this point in the history
… version from 'v6' to 'v7'.

- Increase CACHE_VERSION constant from 'v6' to 'v7' to indicate cache update.
- Add two new font URLs for prefetching: MathJax_Math-Italic.woff and MathJax_Size3-Regular.woff.
  • Loading branch information
Max-42 committed Sep 21, 2023
1 parent f764ab5 commit 3a7576f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion service-worker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// service-worker.js

const CACHE_VERSION = 'v6'; //todo UPDATE?
const CACHE_VERSION = 'v7'; //todo UPDATE?
const CACHE_NAME = `matrix-game-cache-${CACHE_VERSION}`;
const urlsToCache = [
'/',
Expand All @@ -12,6 +12,9 @@ const urlsToCache = [
'assets/libraries/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff',
'assets/libraries/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff',
'assets/libraries/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff',
'assets/libraries/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff',
'assets/libraries/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff',

// icons
'192x192.png',
'512x512.png',
Expand Down

0 comments on commit 3a7576f

Please sign in to comment.