lighthouse fixes
This commit is contained in:
BIN
site/public/fonts/manrope-latin-400-normal.woff2
Normal file
BIN
site/public/fonts/manrope-latin-400-normal.woff2
Normal file
Binary file not shown.
BIN
site/public/fonts/manrope-latin-600-normal.woff2
Normal file
BIN
site/public/fonts/manrope-latin-600-normal.woff2
Normal file
Binary file not shown.
BIN
site/public/fonts/manrope-latin-800-normal.woff2
Normal file
BIN
site/public/fonts/manrope-latin-800-normal.woff2
Normal file
Binary file not shown.
BIN
site/public/fonts/manrope-latin-ext-400-normal.woff2
Normal file
BIN
site/public/fonts/manrope-latin-ext-400-normal.woff2
Normal file
Binary file not shown.
BIN
site/public/fonts/manrope-latin-ext-600-normal.woff2
Normal file
BIN
site/public/fonts/manrope-latin-ext-600-normal.woff2
Normal file
Binary file not shown.
BIN
site/public/fonts/manrope-latin-ext-800-normal.woff2
Normal file
BIN
site/public/fonts/manrope-latin-ext-800-normal.woff2
Normal file
Binary file not shown.
@@ -1,5 +1,4 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
Sitemap: /sitemap-index.xml
|
||||
|
||||
Sitemap: https://santhoshj.com/sitemap-index.xml
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,7 @@ const CACHE_SHELL = `shell-${CACHE_VERSION}`;
|
||||
const CACHE_PAGES = `pages-${CACHE_VERSION}`;
|
||||
const CACHE_MEDIA = `media-${CACHE_VERSION}`;
|
||||
|
||||
const assetSuffix = cacheVersionFromUrl ? `?v=${encodeURIComponent(cacheVersionFromUrl)}` : "";
|
||||
|
||||
const SHELL_ASSETS = ["/", `/styles/global.css${assetSuffix}`, "/favicon.png", "/robots.txt"];
|
||||
const SHELL_ASSETS = ["/", "/favicon.png", "/robots.txt"];
|
||||
|
||||
// Cache.addAll() throws if there are any duplicate requests.
|
||||
const SHELL_ASSETS_UNIQUE = Array.from(new Set(SHELL_ASSETS));
|
||||
@@ -138,25 +136,6 @@ self.addEventListener("fetch", (event) => {
|
||||
return;
|
||||
}
|
||||
|
||||
// Network-first for global CSS to avoid serving stale styling after deploy.
|
||||
// (The SW already caches styles, but network-first prevents a "stuck" old CSS experience.)
|
||||
if (url.origin === self.location.origin && url.pathname === "/styles/global.css") {
|
||||
event.respondWith(
|
||||
(async () => {
|
||||
try {
|
||||
const fresh = await fetch(request);
|
||||
await cachePutSafe(CACHE_SHELL, request, fresh.clone());
|
||||
return fresh;
|
||||
} catch {
|
||||
const cached = await caches.match(request);
|
||||
if (cached) return cached;
|
||||
return fetch(request);
|
||||
}
|
||||
})(),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Stale-while-revalidate for styles/scripts/fonts from same-origin.
|
||||
if (
|
||||
url.origin === self.location.origin &&
|
||||
|
||||
Reference in New Issue
Block a user