Feature/Gameloop enhancements #17

Merged
jusemon merged 4 commits from feature/gameloop-enhancements into main 2025-11-26 17:53:41 -05:00
2 changed files with 12 additions and 1 deletions
Showing only changes of commit 7a5a6c6177 - Show all commits

View file

@ -9,6 +9,13 @@ server {
try_files $uri $uri/ =404;
}
# Prevent caching of version.json
location = /version.json {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
# Enable gzip compression
gzip on;
gzip_types text/html text/css application/javascript;

View file

@ -509,7 +509,11 @@ export class Game {
}
loadVersion() {
fetch('/version.json')
// Add cache-busting query parameter to ensure fresh version data
const cacheBuster = `?t=${Date.now()}`;
fetch(`/version.json${cacheBuster}`, {
cache: 'no-store'
})
.then(response => {
if (response.ok) {
return response.json();