Caching and stale data
A saved copy is quick and may be old. Testers learn where copies hide, how to tell old from new, and how to test with and without them.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a fridge note. A note on the fridge says there is milk in stock. It was true when you wrote it, and it saves you opening the fridge. But if someone drank the milk after you wrote it, the note is out of date and you do not know.
Daily List is a to-do list app. Tom changes the title of a task from Buy milk to Buy oat milk and saves it, but the list still shows Buy milk. When he reloads the page, the new title appears.
A reload changing the display does not identify the cause by itself. In this synthetic case Tom also inspects the list response and verifies that a saved copy was reused. That copy is a cache: a saved copy kept so it can be used again quickly. The old title is : old data shown when newer data exists.
To test fairly, Tom needs to be sure which copy he is looking at. After preserving the failing evidence, he sometimes removes selected saved copies and compares the result. That is , but it does not clear every app, service-worker or intermediary copy or guarantee current origin data.
The note picture has a limit. A fridge note is written by you. Saved copies are kept by the browser, by the app and by computers on the way, so a copy can be hiding in several places.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PLAIN WORDS · 4 in this section
- reloads
- To reload is to load the page again.
- reload
- load the page again
- verifies
- checks that something is true or correct
- reused
- used again
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Finding out which saved copy a page is showing, and whether it is too old.
- Which copy?
- How old?
- Clear it
- Look again
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| Fridge note | Cache |
| The note after the milk was drunk | Stale data |
| Opening the fridge to look | Cache clearing |
WHERE THIS PICTURE STOPS
- A fridge note is written by you. A cache is kept by the browser, the app and computers on the way.
- A note is one thing. A page can have many copies at once.
- Opening the fridge can show its contents directly; clearing one cache does not bypass every layer or prove current origin data.
HOOK
Which copy, how old, clear it, look again.
REMEMBER IT THIS WAY
A story beat: one picture-line that carries the order or the cause.
A reload shows the new title, but that alone does not prove a cache caused the old display. Tom preserves the failing state and checks the actual stored-response evidence.
| In the trick | What it stands for |
|---|---|
| Saved copy | the browser kept a saved copy of the list |
| Old title | the stale title Buy milk |
| Reload | the new title appears |
Not every old screen is a cache, since the server may hold the old title too.
TELL A FRIEND
A fridge note says milk is in stock and saves you opening the fridge. A cache is a saved copy that saves a trip to the server, and it can be out of date.
OFTEN MIXED UP WITH Cookies and sessions. The cookie lesson covers session identifiers and revocation. This lesson covers stored copies and evidence about their freshness.
PRACTISE AND KEEP
Sources for this topic — 6 sources
- Market practice
HyperText Transfer Protocol (HTTP) caching (Mozilla developer docs) ↗ — Mozilla (developer documentation) · A stored response is fresh or stale; a fresh one can be reused; max-age sets how long a response stays fresh; a stale one can be checked with the server, which answers not modified if nothing changed; stale responses are not discarded at once (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Reload From Origin (WebKit bug 169865) ↗ — WebKit project bug tracker · A bug report says Reload From Origin makes cache lookups fail and suggests it when stale content is suspected (search excerpt, page not opened; bug-tracker comment)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
How to temporarily disable the cache for a website in Chrome (Chrome Story blog) ↗ — Chrome Story (blog) · The developer tools have a setting that turns the cache off, and it applies only while the tools are open (search excerpt, page not opened; older blog post)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
Overview of the HyperText Transfer Protocol (HTTP) (Mozilla developer docs) ↗ — Mozilla (developer documentation) · Loading a page is a chain of requests, with the page text first and the files it names after (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Official requirement
RFC 9111 — HTTP Caching (STD 98, June 2022) ↗ — IETF / RFC Editor · RFC9111/STD98,June2022:4.2 freshness/age and permitted stale reuse,4.3validation,4.4invalidation,5.2.2no-cache/no-store/private (relevant primary passages opened6November2026).
Opened relevant primary passages on6November2026 via normal web search and document view. Freshness, age, validation and invalidation; cache directives. Sections4.2–4.4 and5.2 opened on6November2026. Not an assertion that cache clearing proves root cause.
- Market practice
RFC 9111 — HTTP Caching (STD 98, June 2022) ↗ — IETF / RFC Editor · RFC9111/STD98 June2022, complete4.2/4.2.1–4.2.4,4.3.4,4.4,5.2.2.4/.5/.7 read7November2026: age/lifetime, permitted stale reuse,304 update, scoped invalidation,no-cache/no-store/private. HTTP freshness is not a guarantee of application currency or UI refresh.
Opened relevant primary passages on6November2026 via normal web search and document view. Freshness, age, validation and invalidation; cache directives. Sections4.2–4.4 and5.2 opened on6November2026. Not an assertion that cache clearing proves root cause.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.