-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
53 lines (51 loc) · 1.96 KB
/
Copy pathindex.html
File metadata and controls
53 lines (51 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>FrugalSloth</title>
<script>
// AGGRESSIVE CACHE BUST: deregister old service workers + clear all caches
(function() {
const BUILD_VERSION = 'v0.3.3';
const stored = localStorage.getItem('fs_version');
// Always deregister old service workers (they cache old JS)
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function(regs) {
regs.forEach(function(reg) { reg.unregister(); });
});
}
// Always clear all caches
if ('caches' in window) {
caches.keys().then(function(names) {
names.forEach(function(n) { caches.delete(n); });
});
}
if (stored && stored !== BUILD_VERSION) {
console.log('[FrugalSloth] New version ' + BUILD_VERSION + ', hard reloading...');
localStorage.setItem('fs_version', BUILD_VERSION);
location.reload();
} else {
localStorage.setItem('fs_version', BUILD_VERSION);
}
})();
</script>
<script type="module" crossorigin src="./assets/index-aQRTvt3S.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CESx_u1U.css">
</head>
<body>
<div id="root"></div>
<!-- COI service worker for SharedArrayBuffer support -->
<script>
if (typeof window !== 'undefined' && !window.crossOriginIsolated) {
var coiScript = document.createElement('script');
coiScript.src = '/coi-serviceworker.js?v=0.3.3';
coiScript.async = true;
document.head.appendChild(coiScript);
}
</script>
</body>
</html>