Requests the browser can skip

Both pictures below have already been used elsewhere on this site: badge.png came from the one image page, and waves.png from the three images page.

Rings badge Wave pattern

The experiment

  1. With Disable cache ticked, reload. Both images are downloaded again: the Size column shows real numbers.
  2. Now untick Disable cache and reload.
  3. The rows are still there — the browser still decided about each file — but Size now says (disk cache) or (memory cache), and Time drops to almost nothing.

A cached file is one the browser already has on your computer, so it does not need to ask the server for it again. Sometimes it asks anyway, just to check, and the server replies 304 Not Modified, meaning "the copy you have is still fine". A 304 response is tiny because it contains no file, only that answer.

This is why a site feels faster the second time you visit it.

This page: 3 requests. 1 HTML + 2 images — though with the cache switched on, two of them may cost nothing.