fix(auth, pwa): restore api.auth.me, bump PWA cache to v5.3, and fix CEFR CSS styling
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
// Service Worker for Notes English PWA (Stage 2)
|
||||
// Strategy: Cache-first for static assets, Network-first for API calls.
|
||||
|
||||
const CACHE_NAME = 'notes-v5.2';
|
||||
const CACHE_NAME = 'notes-v5.3';
|
||||
const OFFLINE_URL = '/';
|
||||
|
||||
const PRECACHE_URLS = [
|
||||
@@ -67,14 +67,14 @@ self.addEventListener('fetch', (event) => {
|
||||
return;
|
||||
}
|
||||
|
||||
// Static assets (CSS, JS, icons) → Cache-first
|
||||
// Static assets (CSS, JS, icons) → Cache-first (with ignoreSearch)
|
||||
if (
|
||||
url.pathname.startsWith('/static/') ||
|
||||
url.pathname === '/manifest.json' ||
|
||||
url.pathname === '/sw.js'
|
||||
) {
|
||||
event.respondWith(
|
||||
caches.match(request).then((cached) => {
|
||||
caches.match(request, { ignoreSearch: true }).then((cached) => {
|
||||
return cached || fetch(request).then((response) => {
|
||||
if (response.ok) {
|
||||
const clone = response.clone();
|
||||
|
||||
Reference in New Issue
Block a user