Spaces:
Running
Running
chore: force cache refresh for map header changes
Browse files- Bump Service Worker VERSION to 1754659000
- Update cache-busting timestamps in map.html
- Ensures new forest header image and UI adjustments are served
- Reduces chance of stale content from SW cache on hf.space
- static/map.html +2 -2
- static/sw.js +1 -1
static/map.html
CHANGED
@@ -813,7 +813,7 @@
|
|
813 |
// Force refresh if we detect cached version
|
814 |
(function() {
|
815 |
const currentVersion = '5.1.0';
|
816 |
-
|
817 |
const lastVersion = sessionStorage.getItem('treetrack_version');
|
818 |
const lastTimestamp = sessionStorage.getItem('treetrack_timestamp');
|
819 |
|
@@ -941,7 +941,7 @@
|
|
941 |
|
942 |
<!-- Leaflet JS -->
|
943 |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
|
944 |
-
|
945 |
|
946 |
<script>
|
947 |
// Initialize Granim background animation on page load
|
|
|
813 |
// Force refresh if we detect cached version
|
814 |
(function() {
|
815 |
const currentVersion = '5.1.0';
|
816 |
+
const timestamp = '1754659000'; // Current timestamp for cache busting
|
817 |
const lastVersion = sessionStorage.getItem('treetrack_version');
|
818 |
const lastTimestamp = sessionStorage.getItem('treetrack_timestamp');
|
819 |
|
|
|
941 |
|
942 |
<!-- Leaflet JS -->
|
943 |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
|
944 |
+
<script src="/static/map.js?v=4.0.1&t=1754659000">
|
945 |
|
946 |
<script>
|
947 |
// Initialize Granim background animation on page load
|
static/sw.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
// TreeTrack Service Worker - PWA and Offline Support
|
2 |
-
const VERSION =
|
3 |
const CACHE_NAME = `treetrack-v${VERSION}`;
|
4 |
const STATIC_CACHE = `static-v${VERSION}`;
|
5 |
const API_CACHE = `api-v${VERSION}`;
|
|
|
1 |
// TreeTrack Service Worker - PWA and Offline Support
|
2 |
+
const VERSION = 1754659000; // Cache busting bump - force clients to fetch new static assets and header image change
|
3 |
const CACHE_NAME = `treetrack-v${VERSION}`;
|
4 |
const STATIC_CACHE = `static-v${VERSION}`;
|
5 |
const API_CACHE = `api-v${VERSION}`;
|