Cache Storage Inspection
You'll learn how to view, inspect, and manage Cache API entries created by service workers directly in DevTools.
What Is Cache Storage Inspection?
When service workers use the Cache API to store assets for offline use or performance, those caches live in the browser's Cache Storage. DevTools gives you a window into this storage, letting you see exactly what your service worker has cached, inspect individual requests and responses, and manually clear entries when debugging or testing new cache strategies.
Think of it like opening the filing cabinet where your service worker keeps copies of resources—you can see what's filed away, read the contents, and throw out old files if needed.
Accessing Cache Storage in DevTools
Navigate to the Application panel and look for the Cache Storage section in the left sidebar (under "Storage"). You'll see a list of named caches your service worker has created. Click any cache name to view its contents.
What You Can Inspect
Each cache entry shows:
- Request URL: The resource that was cached
- Response status: HTTP status code (usually 200)
- Response headers: Content-Type, Cache-Control, etc.
- Response body: Preview or full content of the cached resource
You can click on any entry to see the full request and response details, just like in the Network panel. This helps verify that your Cache-First, Network-First, or Stale-While-Revalidate strategies are storing what you expect.
Manual Cache Management
Right-click on a cache name to delete the entire cache, or select individual entries and delete them. This is invaluable when:
- Testing cache updates after deploying new assets
- Debugging why stale content is being served
- Verifying cache invalidation logic
Key Takeaway: Cache Storage Inspection in DevTools lets you view all Cache API entries created by service workers, examine cached requests/responses in detail, and manually clear caches for debugging—essential for verifying your offline and performance strategies work correctly.