Skip to content

Commit 91064eb

Browse files
committed
cache a few more filetypes (idk maybe i js say cache all or smth
1 parent 6789666 commit 91064eb

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

static/game_worker.js

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

118124
if (extensions.some(ext => url.pathname.endsWith(ext))) {

0 commit comments

Comments
 (0)