You change the weekend opening hours, but a browser still reads yesterday’s version of the schedule. The response may be stale by design. With stale-while-revalidate, a cache can reuse an older response briefly while it checks for an update. Diagnose the two requests before changing the policy.
Read the freshness and stale windows
max-age sets the freshness lifetime. stale-while-revalidate gives a supporting cache an additional interval in which it can serve an expired response while revalidating. For this example, the response is fresh for one second and may be reused while stale for up to eight more seconds.
Cache-Control: max-age=1, stale-while-revalidate=8
After that additional interval, this directive no longer authorizes stale reuse. Check the cache that actually served the response, since another layer can have a different policy.
What happened while the server held the refresh
SEOWithJack tested the header with a local schedule resource in Chrome. We cached version 1, changed the origin to version 2 and waited 2.3 seconds. We held the origin’s revalidation response until Chrome’s stale read had completed.
| Request stage | Chrome received | Origin evidence |
|---|---|---|
| First request | Version 1 | The server sent version 1 and its ETag. |
| Repeat while fresh | Version 1 | No new request reached the origin. |
| Expired within the stale window | Version 1 | Chrome sent If-None-Match: "v1". The server held its answer until the old body had been returned. |
| After releasing the response | Version 2 | The origin had sent the new body and tag. |
The timing proved the stale read did not wait for the second response. This was one Chrome cache test. A CDN or service worker can follow its own policy.
Trace which copy the user actually received
- Identify the exact resource. Find the document, JSON or image URL that holds the stale content. Compare the delivered body or version marker and record Cache-Control, ETag and any Age header.
- Compare before and after the freshness limit. With caching enabled, request the same URL again within the stale window. If you control the origin, look for a request with the older validator. A conditional check can return new content or confirm that the existing copy can still be used. See the 304 and ETag example for the unchanged case.
- Match the time window to the content. If stale hours or service availability would mislead customers, use a policy that matches your update needs and check it at the layer serving that URL. Versioned assets are a separate case. See the stylesheet version check for changing an asset URL.
Frequently asked questions
What does stale-while-revalidate mean?
It permits a supporting cache to return an expired response for a limited time while it tries to refresh that copy.
Should I clear the browser cache to test it?
Keep caching enabled when reproducing a stale read. Use a fresh profile or a cache-bypassing check separately if you need to compare with a clean request.
What happens after the stale window?
The permission from this directive ends. The cache normally needs to revalidate or fetch a response, subject to other applicable caching rules.

