chore: rrevent caching of version.json and add cache-busting to fetch request

This commit is contained in:
Juan Sebastián Montoya 2025-11-26 16:52:51 -05:00
parent 77bd5bb395
commit 7a5a6c6177
2 changed files with 12 additions and 1 deletions

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();