diff --git a/js/layers/adsb-layer.js b/js/layers/adsb-layer.js index 382a1b0..e04e50f 100644 --- a/js/layers/adsb-layer.js +++ b/js/layers/adsb-layer.js @@ -52,7 +52,7 @@ export function createAdsbLayer(ctx, spec) { const byHex = new Map(); let anyOk = false; const results = await Promise.allSettled( - spec.endpoints.map((ep) => fetch(`proxy/adsb/${ep}`).then((r) => { + spec.endpoints.map((ep) => fetch(`proxy/adsb/${ep}`, { cache: 'no-store' }).then((r) => { if (!r.ok) throw new Error(String(r.status)); return r.json().then((d) => ({ ep, d })); })) diff --git a/js/layers/aircraft.js b/js/layers/aircraft.js index 7ffb69c..d8c1b9a 100644 --- a/js/layers/aircraft.js +++ b/js/layers/aircraft.js @@ -146,7 +146,7 @@ export default function create(ctx) { async function poll() { let res; try { - res = await fetch(buildUrl()); + res = await fetch(buildUrl(), { cache: 'no-store' }); } catch (err) { ui.setStatus('aircraft', 'network error — retrying', 'warn'); return; @@ -217,7 +217,7 @@ export default function create(ctx) { replayInFlight = true; lastReplayT = tSec; try { - const res = await fetch(`history/aircraft?t=${tSec}`); + const res = await fetch(`history/aircraft?t=${tSec}`, { cache: 'no-store' }); if (isLive) return; // clock snapped back to live mid-fetch — discard if (res.status === 404) { bc.removeAll(); diff --git a/js/layers/firms.js b/js/layers/firms.js index 563e63b..bd728c8 100644 --- a/js/layers/firms.js +++ b/js/layers/firms.js @@ -34,7 +34,7 @@ export default function create(ctx) { if (!loaded) ui.setStatus('firms', 'fetching detections…', 'warn'); let res; try { - res = await fetch('proxy/firms'); + res = await fetch('proxy/firms', { cache: 'no-store' }); } catch { ui.setStatus('firms', 'network error', 'err'); return; } diff --git a/js/layers/geojson-layer.js b/js/layers/geojson-layer.js index 1923f63..bdca2fb 100644 --- a/js/layers/geojson-layer.js +++ b/js/layers/geojson-layer.js @@ -120,7 +120,7 @@ export function createGeoJsonLayer(ctx, spec) { async function poll() { let res; try { - res = await fetch(spec.url); + res = await fetch(spec.url, { cache: 'no-store' }); } catch { ui.setStatus(spec.id, 'network error — retrying', 'warn'); return; diff --git a/js/layers/military.js b/js/layers/military.js index 88c50ac..51af494 100644 --- a/js/layers/military.js +++ b/js/layers/military.js @@ -47,7 +47,7 @@ export default function create(ctx) { async function poll() { let res; try { - res = await fetch(A.proxyMil); + res = await fetch(A.proxyMil, { cache: 'no-store' }); } catch (err) { ui.setStatus('military', 'network error — retrying', 'warn'); return; diff --git a/js/layers/radiogarden.js b/js/layers/radiogarden.js index c5ca8f3..a54b18f 100644 --- a/js/layers/radiogarden.js +++ b/js/layers/radiogarden.js @@ -26,7 +26,7 @@ export default function create(ctx) { ui.setStatus('radio', 'loading stations…', 'warn'); let res; try { - res = await fetch('proxy/rg/ara/content/places'); + res = await fetch('proxy/rg/ara/content/places', { cache: 'no-store' }); } catch { ui.setStatus('radio', 'network error', 'err'); return; } @@ -89,7 +89,7 @@ export default function create(ctx) { p.hidden = false; let items = []; try { - const res = await fetch(`proxy/rg/ara/content/page/${encodeURIComponent(meta.placeId)}/channels`); + const res = await fetch(`proxy/rg/ara/content/page/${encodeURIComponent(meta.placeId)}/channels`, { cache: 'no-store' }); const j = await res.json(); for (const block of (j.data && j.data.content) || []) { for (const it of block.items || []) { diff --git a/js/layers/radius.js b/js/layers/radius.js index a4ad32d..ff20992 100644 --- a/js/layers/radius.js +++ b/js/layers/radius.js @@ -53,7 +53,7 @@ export default function create(ctx) { lastKey = key; inFlight = true; try { - const res = await fetch(`proxy/adsb/lat/${lat}/lon/${lon}/dist/${DIST_NM}`); + const res = await fetch(`proxy/adsb/lat/${lat}/lon/${lon}/dist/${DIST_NM}`, { cache: 'no-store' }); if (key !== lastKey) return; // camera moved again mid-fetch — stale if (!res.ok) { ui.setStatus('radius', `HTTP ${res.status}`, 'warn'); return; } const data = await res.json(); diff --git a/js/layers/roadcams.js b/js/layers/roadcams.js index 12ee899..6effef2 100644 --- a/js/layers/roadcams.js +++ b/js/layers/roadcams.js @@ -38,7 +38,7 @@ export default function create(ctx) { async function load() { ui.setStatus('roadcams', 'loading cameras…', 'warn'); const results = await Promise.allSettled(REGIONS.map(async (r) => { - const res = await fetch(`proxy/cams/${r.id}`); + const res = await fetch(`proxy/cams/${r.id}`, { cache: 'no-store' }); if (!res.ok) throw new Error(`HTTP ${res.status}`); return { region: r, cams: await res.json() }; })); diff --git a/js/layers/satellites.js b/js/layers/satellites.js index 8155b18..32e52a6 100644 --- a/js/layers/satellites.js +++ b/js/layers/satellites.js @@ -120,7 +120,7 @@ export default function create(ctx) { async function run() { const sources = CONFIG.satellites.sources; const settled = await Promise.allSettled( - sources.map((s) => fetch(`${CONFIG.proxy.celestrak}?${s.q}`).then((res) => { + sources.map((s) => fetch(`${CONFIG.proxy.celestrak}?${s.q}`, { cache: 'no-store' }).then((res) => { if (!res.ok) throw new Error(`HTTP ${res.status}`); return res.text(); }))