Wirebook

Wirebook › Bonus lesson

Why does the website still show the old picture?

Bonus lesson · about 6 minutes · hands-on · nothing you type leaves your browser

A website updates its picture, but your browser keeps showing the old one. Is the site broken — or is your browser still looking at a saved copy it made earlier? Here you can compare the server’s picture with the one on your shelf, and learn when soft reload, hard refresh and “not modified” replies each help.

Compare the server with your browser shelf

This pretend site lives only in your browser — nothing is uploaded. Publish a new logo on the server, then “visit” again. If the shelf copy is still fresh, you may keep seeing the old picture even though the server has moved on.

On the server v1

What you see empty shelf

Pretend clock: 0 s
0served from shelf
0full downloads
0times you saw an old logo

Ask “has it changed?” with an ETag

Even after the shelf life ends, a careful browser can send the copy’s fingerprint (ETag) and ask “give me the file only if it’s different.” The server may answer 304 Not Modified — keep your copy — or 200 with a brand-new picture.


    

    

What your browser is really doing

Browsers keep a cache: a shelf of recent files so everyday browsing does not re-download every picture. Each saved copy gets a freshness window from headers such as Cache-Control: max-age=…. While that window lasts, a soft visit can reuse the shelf without asking the server. A hard refresh skips the shelf and always downloads again.

AHA! The website did update. Your browser was still holding yesterday’s picture on its shelf. Comparing the two copies is the clue — not a broken internet.

Try this next time a site “didn’t update”

  1. Hard-refresh the page (or open it in a private window with an empty shelf).
  2. If you build websites, give changing pictures a new filename or query hash so the shelf cannot reuse the old URL.
  3. Use short max-age for HTML, longer for hashed assets, and ETags so revalidation stays cheap.

Grown-up twin: Tooltern’s help pages on old CSS after a deploy, 304 Not Modified and no-cache vs no-store show the same ideas with real headers and curl commands.

Words from this lesson

Earn a bonus badge

Get all 3 right to collect the Stale pictures bonus badge. Bonus badges are extra: they don't change your stamp count or rank. Wrong answers are fine: just try again.

1. A site updated its logo, but you still see the old one. What often happened?

2. What does a hard refresh usually do?

3. The browser sends If-None-Match with an ETag and the server replies 304. What does that mean?

Try another lesson

  1. 3Can a website get tired?7 min · interactive
  2. 12How does a game remember where you got to?6 min · interactive
  3. 1What happens when you open a web page?6 min · interactive