Skip to content

Commit 4e58052

Browse files
committed
confidentely cache
1 parent a7a519d commit 4e58052

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

static/game_worker.js

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -108,27 +108,9 @@ function isCacheableRequest(request) {
108108
if (request.method !== 'GET') {
109109
return false;
110110
}
111-
// Cache based on file extensions
112-
const extensions = [
113-
'.html', '.js', '.css', '.json',
114-
'.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg',
115-
'.woff', '.woff2', '.ttf', '.otf',
116-
'.mp3', '.ogg', '.wav',
117-
'.mp4', '.webm',
118-
'.spritemap', '.bitmap', '.map', '.bit', '.obj', '.wasm',
119-
'.rom', '.nes', '.sfc', '.gbc', '.gba', '.smc', '.gen', '.z64',
120-
'.n64', '.v64', '.z64', '.iso', '.cue', '.bin', '.img',
121-
'.apk', '.ipa', '.exe', '.msi', '.dmg', '.deb', '.rpm',
122-
'.zip', '.tar', '.gz', '.bz2', '.xz', '.7z',
123-
'.font', '.eot', '.ttc', '.woff2', '.woff', '.svgz',
124-
// atp just cache everything it revalidates every 7 days no update is that important
125-
];
126111

127-
if (extensions.some(ext => url.pathname.endsWith(ext))) {
128-
return true;
129-
}
130-
131-
return false;
112+
// Blacklist, not whitelist
113+
return true;
132114
}
133115

134116
// Network-first strategy with fallback to cache

0 commit comments

Comments
 (0)