Clear Cache Clear Cache
Add to Chrome — Free

Clear Cache Blog

Clear Cache for Web Developers: Test Changes Instantly

Updated March 2026 · 7 min read

Quick Answer Open Chrome DevTools (F12) → Network tab → check Disable cache. While DevTools is open, Chrome fetches everything fresh from your server, skipping all cached resources. This is the fastest workflow for testing CSS, JS, and HTML changes during development. For production cache issues, pair this with a one-click extension for quick site-specific cache clearing.
📋 Table of Contents
📋 Table of Contents

You push a CSS change. You refresh. You still see the old style. You hard refresh. Still nothing. You open incognito. It's there. You close incognito and refresh again. It's gone. This cycle — while maddening — is a rite of passage for web developers, and understanding why it happens and how to control it will save you hours of frustration.

This guide covers every cache-related concept web developers need to know, from DevTools tricks to cache-busting strategies to service worker cache management.

Clear Site Cache Instantly During Development

The Clear Cache extension adds a one-click site cache clear to your toolbar — perfect for dev workflows where you need clean state fast.

Add to Chrome — Free


The Developer's Caching Problem

Browser caching creates a fundamental tension for web developers:

The problem compounds when you involve multiple layers: your browser cache, your server's cache, and potentially a CDN in between. A change you made might be live on the server but invisible to you because one of those layers is serving an old version.



DevTools Methods for Developers

1. Disable Cache (Best for Active Development)

This is the developer's primary tool. With DevTools open:

Step 1 — Open DevTools: F12 on Windows / Cmd+Option+I on Mac
Step 2 — Click the Network tab
Step 3 — Check Disable cache in the toolbar
Step 4 — Reload the page

While DevTools is open with this setting enabled, Chrome bypasses its cache entirely and makes a fresh request for every resource. Close DevTools, and normal caching resumes for your users.

Tip: Keep DevTools open in a separate window (Ctrl+Shift+J) or undocked to the side. This way "Disable cache" remains active throughout your development session without DevTools cluttering your working view.

2. Hard Reload with Cache Clear (Right-Click Reload)

Hold Shift and click the reload button, or right-click the reload button for the full menu:

"Empty cache and hard reload" is the most powerful single-page option — it clears your browser's stored copy of the site's resources before reloading.

3. Application Tab — Fine-Grained Cache Control

The Application tab in DevTools gives you complete visibility and control over all cached data for the current site:

For debugging cache issues, the Application tab tells you exactly what Chrome has stored and lets you delete specific items without clearing everything.



Cache-Busting Strategies for Production

The best long-term solution isn't manually clearing cache — it's designing your asset pipeline so browsers automatically fetch new versions when files change.

Strategy 1: Content Hash in Filename (Recommended)

Modern build tools (Webpack, Vite, Parcel) can generate unique filenames based on file content:

// Old: same filename every build
main.css
app.js

// New: hash in filename, changes when content changes
main.a3f2c1d8.css
app.b4e8f1a2.js

Your HTML references the current hash. When the file changes, a new hash is generated, the filename changes, and browsers fetch the new file automatically. You can set long cache durations (1 year) on these assets because the URL itself changes on every update.

Strategy 2: Query String Versioning

Append a version or timestamp parameter to asset URLs:

<link rel="stylesheet" href="/styles.css?v=2.4.1">
<script src="/app.js?t=1742300000"></script>

Less reliable than filename hashing because some proxies and CDNs ignore query strings for caching purposes, but works well for simple setups.

Strategy 3: Cache-Control Headers

Set appropriate headers based on asset type:

Asset TypeRecommended Cache-ControlWhy
HTML filesno-cacheAlways check for updates; HTML references hashed assets
Hashed CSS/JSmax-age=31536000, immutableHash guarantees uniqueness; can cache forever
Images (static)max-age=6048001 week; balance freshness vs performance
API responsesno-storeNever cache dynamic data
Fontsmax-age=31536000, immutableFonts rarely change; long cache is fine


Service Worker Cache: The Advanced Problem

If your site uses a service worker (common in PWAs and sites using Workbox), there's an additional cache layer that lives between your server and the browser.

Service workers can intercept every network request and return cached responses. This means even with DevTools "Disable cache" checked, you might still get cached responses from the service worker.

Clearing Service Worker Cache in DevTools

  1. Open DevTools → Application tab
  2. In the left sidebar, click Service Workers
  3. Check Update on reload — this forces the latest service worker on every page load
  4. Optionally check Bypass for network — this skips the service worker entirely for all requests
  5. To remove the service worker completely, click Unregister

Clearing Cache Storage

  1. DevTools → Application → Cache Storage
  2. Expand the cache storage section
  3. Right-click each cache (they have names like "workbox-precache-v2") and select Delete
Development tip: If you're actively developing a PWA, consider adding a version number to your service worker cache names. When you update the service worker, the old cache is automatically cleaned up on next visit. This avoids the "update looks fine on my machine but users see the old version" problem.


Testing as a First-Time Visitor

One of the most important developer tests is experiencing your site with an empty cache — exactly as a first-time visitor would. Several approaches:



Using the Clear Cache Extension in Development Workflow

For a fast development cycle, having a one-click site cache clear in your toolbar beats navigating settings menus. The Clear Cache for Specific Site extension works perfectly alongside DevTools for moments when you need a clean state quickly:

Built for Developer Workflows

One-click site cache clear for Chrome. No settings menus, no accidental global clears, just clean state when you need it.

Install Clear Cache — Free


Frequently Asked Questions

How do I disable browser cache in Chrome DevTools?

Open DevTools (F12), go to the Network tab, and check the 'Disable cache' checkbox. This prevents Chrome from using cached resources for any requests while DevTools is open. The setting only applies while DevTools is open — close DevTools and normal caching resumes.

What is cache busting and how do I implement it?

Cache busting forces browsers to load a new version of a file by changing its URL. Common techniques: adding a version query string (?v=2.1.0), using a build hash in the filename (main.a3f2c1d.js), or using HTTP cache headers with short max-age values for HTML and long max-age with immutable for hashed assets.

How do I clear service worker cache in Chrome?

In Chrome DevTools, go to Application tab → Service Workers. Click 'Update' to force the latest service worker, or 'Unregister' to remove it. To clear Cache Storage used by service workers, expand 'Cache Storage' in the left panel, right-click each cache entry, and select Delete.

Why does my CSS change not show even after hard refresh?

If Ctrl+Shift+R doesn't show your CSS change, the stylesheet may be cached with a long max-age header from a CDN. Try opening DevTools, enabling 'Disable cache', and refreshing. If you still see old CSS, check your CDN or server cache and verify the correct file was deployed.

How do I test my website as a first-time visitor with empty cache?

Open an incognito window (Ctrl+Shift+N) — it starts with no cache. Alternatively, in regular Chrome with DevTools open, enable 'Disable cache' in the Network tab. For the most accurate test, use Chrome's Network Throttling to simulate a slow connection and see how your site performs without caching advantages.

More Free Chrome Tools by Peak Productivity

Bulk Image Downloader
Bulk Image Downloader
Download all images from any page
YouTube Looper Pro
YouTube Looper Pro
Loop any section of a YouTube video
Citation Generator
Citation Generator
Generate APA/MLA/Chicago citations
PDF Merge & Split
PDF Merge & Split
Merge and split PDFs locally
WebP to JPG/PNG
WebP to JPG/PNG
Convert WebP images to JPG/PNG
Screen Recorder Pro
Screen Recorder Pro
Record your screen or tab with audio