The web HTTP caching 2 min read

How does HTTP caching work?

A browser can reuse a cached copy instead of asking the server again. Should an invoice response be stored the same way as the site logo?

  1. Look at who can reuse the copy

    A private cache belongs to a single user context, such as a browser’s cache. A shared cache can serve different users. A public logo may be reusable across users. An invoice must stay within the access rules for that customer.

    In short Ask who might receive the stored response.

  2. Tell caches how to handle the invoice

    The server can send Cache-Control: no-store to instruct HTTP caches to avoid storing that response. If browser storage is acceptable but shared caching is not, private expresses a different rule.

    Invoice response → Cache-Control → Reuse decision Invoice responseCache-ControlReuse decision

    In short Use no-store when the response should stay out of HTTP caches.

Where this applies

Cache-Control governs HTTP caches. It can’t stop someone from saving a file they already received.

Keep this

Choose a cache rule based on the response and its audience.

Review private responses separately from reusable public assets.

Sources

Last reviewed 21 November 2026.

Next byte · The web What is in an HTTP request and response?