chore: rrevent caching of version.json and add cache-busting to fetch request
This commit is contained in:
parent
77bd5bb395
commit
7a5a6c6177
2 changed files with 12 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue