Audit and fix accessibility issues across the portfolio to ensure WCAG 2.1 AA compliance.
The English summary is being prepared. Showing the original description.
Service worker management, offline support, cache strategies, and SW debugging.
The English summary is being prepared. Showing the original description.
Run score Not tested
See how to installReview the instructions the agent will receive before you install.
Note: This portfolio has a hand-written service worker (public/sw.js) but is NOT a PWA. There is no manifest.json.
File: public/sw.js
Current version: v4
Cache strategy by path:
| Path pattern | Strategy | Notes |
|---|---|---|
_next/static/ | Network-first | Prevents stale chunks |
_next/data/ | Network-first | Fresh page data |
/api/ | Network-only | Never cache API responses |
fonts/ | Cache-first | Static, immutable assets |
images/ | Cache-first | Static images |
| Other | Stale-while-revalidate | Balanced approach |
Chrome DevTools:
Ctrl+Shift+R (Windows) / Cmd+Shift+R (Mac)Via code (for users):
The service worker includes a version check. When the version changes, the old cache is automatically cleared in the install event handler.
When making changes to public/sw.js:
CACHE_VERSION constant:const CACHE_VERSION = 'v5'; // was v4
Add to the urlsToCache array in the install handler:
const urlsToCache = [
'/',
'/offline',
'/fonts/inter-var.woff2',
'/new-static-asset.js',
];
Change cache strategy for a path:
In the fetch handler, add a new case:
if (url.pathname.startsWith('/new-path/')) {
// Network-first strategy
event.respondWith(
fetch(event.request)
.then(response => {
const responseClone = response.clone();
caches.open(CACHE_NAME).then(cache => {
cache.put(event.request, responseClone);
});
return response;
})
.catch(() => caches.match(event.request))
);
return;
}
Cache-first (static assets):
Request → Cache hit? → Yes → Return cached
→ No → Fetch → Cache → Return
Best for: fonts, images, immutable assets
Network-first (API, dynamic):
Request → Fetch → OK? → Return response → Cache
→ Fail? → Cache hit? → Return cached
→ No? → Offline fallback
Best for: API calls, dynamic pages, _next/static/
Stale-while-revalidate:
Request → Cache hit? → Yes → Return cached + fetch in background
→ No → Fetch → Cache → Return
Best for: pages, HTML, semi-static content
Current offline page: /offline (if configured)
To add offline support for a route:
urlsToCache in the install handlerProblem: Stale content after deployment
# 1. Check if SW is registered
# DevTools → Application → Service Workers → "Active" state
# 2. Check cache contents
# DevTools → Application → Cache Storage → expand caches
# 3. Force update
# DevTools → Service Workers → "Update on reload" checkbox → Reload
Problem: Page shows old version
CACHE_VERSION was incremented in sw.jsProblem: Assets not loading
Problem: SW not registering
public/sw.js existsService workers add minimal overhead:
Keep the SW lean:
network-first for frequently updated contentCACHE_VERSION after changes/api/)# Check SW status
# DevTools → Application → Service Workers
# Check caches
# DevTools → Application → Cache Storage
# Force SW update
# DevTools → Service Workers → "Update on reload" → Reload
# Clear everything
# DevTools → Application → Storage → "Clear site data"
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Audit and fix accessibility issues across the portfolio to ensure WCAG 2.1 AA compliance.
The English summary is being prepared. Showing the original description.
Creates a new blog post document in the Sanity studio. Use when the user wants to write a blog post, publish an article, or schedule a future post.
The English summary is being prepared. Showing the original description.
Creates a new certification document in the Sanity studio. Use when the user wants to add a credential, certificate, or professional accreditation to the Certifications collection.
The English summary is being prepared. Showing the original description.
Adds a new skill MD file to the studio's skills collection. Use when the user wants to author a new step-by-step recipe for the studio's in-app Skills tool or the .agents mirror.
The English summary is being prepared. Showing the original description.
Creates a new project document in the Sanity studio. Use when the user wants to add a new portfolio project, a case study, or a work sample to the Projects collection.
The English summary is being prepared. Showing the original description.
Creates a new experience document in the Sanity studio. Use when the user wants to add a job, role, internship, or work history entry to the Experience collection.
The English summary is being prepared. Showing the original description.