Three tiles comparing the next page view of 30 images in Chrome: no-store 30 requests and 3.60 MB, no-cache 30 requests and 6.5 KB, max-age of one year 0 requests and 0 bytes

On a test page with 30 images, the second page view sent 3,599,384 bytes with no-store, 6,480 bytes with no-cache, and nothing at all with a one-year max-age. The last two look almost equal on a bill, but no-cache still made 30 requests and took 534 ms to load against 16 ms. The long max-age has its own price: when we replaced a file at the same URL, browsers kept showing the old one for the whole test.

Here is what each header did, what it would cost at list prices, and the three rules we would use. Disclosure: we sell S3-compatible storage with public files. The test and the advice apply to any bucket.

What we tested, and what we didn't

We ran a page of 30 JPEGs, 3,591,728 bytes in total, through a fixed visit sequence on 4 November 2026 on one Mac: Chrome 156.0.8078.80 three times, Firefox 159.0 twice, and Playwright's WebKit 27.2 build twice, all headless. A small local server answered like a public bucket, with an ETag, a Last-Modified, the stored Cache-Control, and a 304 when a conditional request matched. It counted every image request and byte at the socket. In Chrome, the browser's own count of network bytes matched the server's in every step.

Four limits matter. It's HTTP/1.1 on localhost with 50 ms added to each image request, so load times show the shape of the difference and aren't a forecast for your site. Headers cost fewer bytes under HTTP/2, and TLS isn't counted. WebKit's Playwright build isn't Safari, and no phone browser ran. And this is not a test of a real provider, ours included: a CDN in front of a bucket adds its own cache, which we didn't test.

The next page view

This is the case that matters most: someone opens a second page that uses the same images. Each count below held in all three browsers.

Cache-ControlImage requestsStatusBytes the server sentLoad time, Chrome
no-store3030 x 2003,599,384623 ms
no-cache3030 x 3046,480534 ms
No Cache-Control, file 30 days old00023 ms
public, max-age=3000030 ms
public, max-age=30, stale-while-revalidate=60000011 ms
public, max-age=3153600000016 ms
public, max-age=31536000, immutable00030 ms

All of them cost about 3.6 MB on the first visit, so the header changes what happens after that. The cached runs were all under 35 ms, and the differences between them are noise. Closing and reopening the browser changed nothing: those images still came from the disk cache with no requests.

A 304 saves the download but not the trip. Each one was 216 bytes back from the server, and about 726 bytes of request going out, so no-cache sent more bytes up than down. That is why it took 534 ms against 623 ms for no-store: on a fast local link, nearly all of the wait was the 30 round trips, not the bytes. On a slow connection the 3.6 MB would matter far more, but the round trips never go away.

No header doesn't mean no caching

A bucket that sends no Cache-Control isn't asking browsers to check every time. The file 30 days old got no requests at all for the whole test, in all three browsers, including after we replaced it. RFC 9111 lets a cache pick its own lifetime from Last-Modified and says a typical setting might be 10% of the file's age, which would be about 3 days here. We didn't wait 3 days to confirm the figure. We did see the same rule work on a file about 100 seconds old: it stayed cached at first, then revalidated with 30 x 304 after a 35-second wait.

So with no header, an old file can stay stale for longer than a new one, and you don't control for how long. Set the header deliberately.

When the time runs out

We waited 35 seconds, past the 30-second lifetime, and loaded the next page. Nothing had changed on the server.

Cache-ControlImage requestsStatusBytes the server sentLoad time, Chrome
public, max-age=303030 x 3046,780590 ms
public, max-age=30, stale-while-revalidate=6003030 x 3047,62022 ms
public, max-age=3153600000012 ms

Both 30-second headers made the same 30 requests. The difference is who waits. With stale-while-revalidate, the page used its cached copies and loaded in 22 ms, while the checks ran in the background. Without it, the page waited 590 ms for the answers. Firefox and WebKit showed the same pattern, at 19 ms and 19 ms with stale-while-revalidate. A short max-age alone means a slow page view every time the lifetime lapses.

Replacing a file at the same URL

This is what a long max-age costs. We overwrote one image with a different one at the same URL, then loaded the next page at once, then again after 35 seconds, and then once more. The new image had a different width, so the page could report which copy it was showing.

Cache-ControlRight after the changeAfter 35 sOne view later
no-storeNew image; 30 full downloadsNew; 30 full downloadsNew; 30 full downloads
no-cacheNew image; 1 x 200 + 29 x 304, 99,995 bytesNew; 30 x 304New; 30 x 304
public, max-age=30Old image; 0 requestsNew; 1 x 200 + 29 x 304New; 0 requests
max-age=30, stale-while-revalidate=600Old image; 0 requestsOld image; 1 x 200 + 29 x 304 in the backgroundNew in Chrome and WebKit; still old in Firefox
public, max-age=31536000Old image; 0 requestsOld image; 0 requestsOld image; 0 requests
No Cache-Control, file 30 days oldOld image; 0 requestsOld image; 0 requestsOld image; 0 requests

Be careful with the one-year row. Those visitors have no way to find out about the new file until the cache drops it or they force a reload. You can't call the copy back from their browsers.

The fix is to change the URL along with the file. We pointed the page at a new file name for that one image. It cost exactly one request and 93,690 bytes of image with a long max-age, the new image appeared at once in all three browsers, and the other 29 images made no requests. That's the whole case for hashed file names: logo.3f9c2e.png can be cached for a year because it will never hold anything else.

The same reasoning applies to presigned links. A cache keys on the whole URL, query string included, so a link signed afresh on each page view should behave as a new file each time, whatever its Cache-Control says. We didn't test presigned links directly; presigned URLs or public files covers that choice.

Reload, hard reload and immutable

An ordinary reload made no image requests while the lifetime lasted, under every max-age we tried. With no-cache it made 30 x 304. A hard reload in Chrome downloaded everything again, 30 x 200 and about 3.6 MB, under every header. That's useful when checking your own site, but it means your own hard reload tells you nothing about what visitors get.

immutable made no measurable difference anywhere in this test: the max-age=31536000 rows with and without it matched in every step of every browser. RFC 8246 defines it to stop revalidation on a user's reload while the file is fresh, and our runs already showed none. One caution on that result: in Firefox we could only trigger a reload from script (location.reload()), as the driver's own refresh command re-downloaded everything and we couldn't press the toolbar button in headless mode, so Firefox's reload button is untested. We still use immutable on hashed names, because it's accurate and costs nothing, but don't expect it to change your numbers.

What it does to a bill

Browser caching and your storage bill overlap but aren't the same. Your visitors feel the requests and the waiting. The provider charges for bytes out and per request. Take the page above with no CDN in front, at Amazon S3 list prices read on 4 November 2026 ($0.09 per GB out, $0.0004 per 1,000 GET requests), with no free allowance. Assume 100,000 page views a month, 60% of them from a browser that already holds the images. That 60% is our illustration: replace it with your own returning traffic.

HeaderBytes outGET requestsBytesRequestsMonth
no-store359.9 GB3,000,000$32.39$1.20$33.59
no-cache144.4 GB3,000,000$12.99$1.20$14.19
public, max-age=31536000144.0 GB1,200,000$12.96$0.48$13.44
text
no-store:  (40,000 x 3,599,384 + 60,000 x 3,599,384) B = 359.9 GB;  x $0.09 = $32.39
no-cache:  (40,000 x 3,599,384 + 60,000 x 6,480) B = 144.4 GB;     x $0.09 = $12.99
one year:  (40,000 x 3,599,864) B = 144.0 GB;                      x $0.09 = $12.96
requests:  100,000 x 30 = 3,000,000;  x $0.0004 / 1,000 = $1.20
one year:  40,000 x 30 = 1,200,000;   x $0.0004 / 1,000 = $0.48

Dropping no-store saves 60% here, exactly the repeat share. Moving from no-cache to a long max-age saves only 75 cents: on the bill they're nearly the same, so the reason to make that move is speed. One assumption to flag: we priced each 304 as one GET. AWS says it bills 200 responses and 4XX errors and lists the 3XX and 4XX codes it doesn't bill. 304 isn't on that list, but the page doesn't name it either. Read your own provider's terms on it.

On tport.space, downloads have no per-GB price under fair use, so the bytes column isn't a line on your bill. The speed gain is the same. See our egress fee comparison for other providers.

Three rules

The fileHeaderWhat you accept
Name changes when the content does (hero.3f9c2e.jpg)public, max-age=31536000, immutableNothing, as long as your build really changes the name
Fixed URL that sometimes changes (a logo, an avatar)public, max-age=3600, with stale-while-revalidate=86400 if you want no slow viewsVisitors may see the old file for up to the hour, plus one view or more with the stale allowance
Must be current on the next viewno-cache30 round trips on our page, each view, though few bytes

Keep no-store for images that must not stay on the visitor's disk. Public images rarely qualify. The one-hour figure is a judgement, not a measurement: the test only shows that the wait ends when the lifetime does, so choose the longest stale period you can live with. Also note that a long max-age is a limit, not a promise, as browsers can drop cached files sooner when short of space. We didn't test that.

Setting the header

Cache-Control is stored with each object when you upload it. These commands use an AWS CLI profile called tport and an rclone remote called new; set yours up as in S3 tools. Add your provider's endpoint, or for tport.space --endpoint-url https://s3.tport.space, to the AWS commands.

bash
aws s3 cp ./images s3://my-site/images/ --recursive --profile tport \
  --cache-control "public, max-age=31536000, immutable"

rclone copy ./images new:my-site/images \
  --header-upload "Cache-Control: public, max-age=31536000, immutable"

To change the header on files already stored, copy them onto themselves. Here's the trap: replacing the metadata replaces all of it. In our run, a copy with only --cache-control turned image/jpeg into binary/octet-stream, which is the wrong type for anything that trusts the header. Set the type as well, one file type at a time:

bash
aws s3 cp s3://my-site/images/ s3://my-site/images/ --recursive --profile tport \
  --exclude "*" --include "*.jpg" --metadata-directive REPLACE \
  --content-type image/jpeg --cache-control "public, max-age=300"

With that filter a PNG in the same folder kept its own type and headers. Copying each object is one more request per file, and any other metadata on them is replaced too. A file already in a visitor's browser keeps the old header until it next checks. And if you're moving between buckets, use rclone's -M: our 100 GB migration plan found a plain copy drops Cache-Control from every file.

We ran these commands with rclone v1.75.2 and aws-cli 1.46.2 against a local copy of the tport.space S3 endpoint and a local store, not against the live service. Check your own files, on any provider, with this:

bash
curl -sI https://my-site-k3x9qa.tport.space/images/logo.png

# use the ETag from the answer above; expect 304 and 0 bytes
curl -s -o /dev/null -w '%{http_code} %{size_download}\n' \
  -H 'If-None-Match: "PASTE-THE-ETAG"' \
  https://my-site-k3x9qa.tport.space/images/logo.png

Look for your Cache-Control value and the right Content-Type in the first answer. If the second answer is a 200 with the full size, conditional requests aren't working and every revalidation will be a full download. Then look at a real page view in your browser's network panel, with cache enabled and without a hard reload.

Serve public files from S3-compatible storage with no per-GB download price, under fair use.

Explore tport.space

Sources, read 4 November 2026