Skip to content

Commit

Permalink
Undo cache invalidation, doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
xdpirate committed Mar 12, 2024
1 parent 100edfd commit 291faa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 0 additions & 10 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,6 @@
error_reporting(E_ERROR | E_WARNING | E_PARSE);
ini_set("display_errors", 1);

if(isset($_GET['invalidateCache'])) {
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Clear-Site-Data: "cache"');
header("Location: ./");
}

$platformList = ["PS5", "PS4", "XSX", "XB1", "Switch", "PC", "Android", "PSVR2", "iOS"];
sort($platformList);

Expand Down
4 changes: 3 additions & 1 deletion php/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@
print("
<div>
Success! This installation of GameHorizon has been updated to <a href='https://github.com/xdpirate/gamehorizon/commit/$commitHash' target='_blank'><b><code>$commitHash</code></b></a>.<br /><br />
<a href='https://github.com/xdpirate/gamehorizon/commits/main' target='_blank'>See commit history</a> (opens in a new tab) or <input type='button' value='Return to GameHorizon' onclick='window.location.href='./?invalidateCache';'>
To avoid errors from stale cache entries in your browser, it's a good idea to clear the cache once you exit the updater. You can do this by pressing Ctrl+F5, or by holding down Shift, then clicking the Refresh button in your browser toolbar with the cursor.<br /><br />
<a href='https://github.com/xdpirate/gamehorizon/commits/main' target='_blank'>See commit history</a><br /><br />
<input type='button' value='Return to GameHorizon' onclick='window.location.href=\".\";'>
</div>
");
}
Expand Down

0 comments on commit 291faa3

Please sign in to comment.