What happened?
public/sw.js's tile-cache branch checks
url.hostname.endsWith("tile.openstreetmap.org") to decide whether to
cache-first a map tile request for offline use. This predates the CARTO
basemap migration — CARTO tiles (basemaps.cartocdn.com) now fall through
this check entirely, hit the cross-origin early-return a few lines below,
and are never cached.
What did you expect to happen?
Offline tile caching (the whole point of this service-worker branch, per
its own comment: "so the map still opens on exam day with a weak or absent
signal") should actually cache the tile provider currently in use.
Steps to reproduce
- Read
public/sw.js's fetch handler.
- Compare the hostname check against the actual tile URL in
src/components/map/map-view.tsx (basemaps.cartocdn.com, or
MapTiler's host once that migration lands).
Browser and OS
No response
Checklist
What happened?
public/sw.js's tile-cache branch checksurl.hostname.endsWith("tile.openstreetmap.org")to decide whether tocache-first a map tile request for offline use. This predates the CARTO
basemap migration — CARTO tiles (
basemaps.cartocdn.com) now fall throughthis check entirely, hit the cross-origin early-return a few lines below,
and are never cached.
What did you expect to happen?
Offline tile caching (the whole point of this service-worker branch, per
its own comment: "so the map still opens on exam day with a weak or absent
signal") should actually cache the tile provider currently in use.
Steps to reproduce
public/sw.js'sfetchhandler.src/components/map/map-view.tsx(basemaps.cartocdn.com, orMapTiler's host once that migration lands).
Browser and OS
No response
Checklist