THE TAKEAWAYS
What to take away
- A shared cache reuses one response for many users. Do not let it store personalised content.
- Mark signed-in responses private. Use no-store for pages that should not be stored at all.
- no-cache does not mean do not store; it means revalidate before reuse.
- Responses can be stored even without Cache-Control, so set it explicitly on every response.
FROM PRIMARY SOURCES
Cache incidents show someone else's page
According to MDN, the Cache-Control header holds directives that control caching in browsers and in shared caches such as proxies and CDNs. There are two broad kinds of cache. One is the browser cache on the user's device, also called a private cache. The other is a proxy or CDN between the origin server and users, called a shared cache.
A shared cache stores a single response and reuses it for multiple users. MDN therefore says developers should avoid storing personalised content in the shared cache. A private cache can store and reuse content for a single user, but if personalised content enters a shared cache, it may be returned to the next person who opens the same URL.
Unlike other failures, cache misconfiguration does not make pages fail to load; it shows another person's information as if it were a normal page. It is often noticed only through user enquiries, by which time many people may have seen it. The more you pursue speed, the more you need to decide first which responses may be shared.
This line should not be drawn by technical staff alone. Business and service owners often know better which pages show personal information. If, at the planning stage of a new page or feature, you check whether it shows per-user information and include a cache-handling item in the planning or specification checklist, you avoid scrambling after it is built.
FROM PRIMARY SOURCES
Having a cookie does not protect you
A common misconception is that pages are automatically treated as personal because sign-in is managed with cookies. MDN's HTTP caching guide states that personalised content is usually controlled by cookies, but the presence of a cookie does not always indicate that it is private, and a cookie alone does not make the response private.
MDN also explains that HTTP is designed to cache as much as possible, so even without Cache-Control, responses are stored and reused if certain conditions are met. This is called heuristic caching. Content that has not been updated for a long time, for example, may be reused for a while even without an explicit expiry.
In other words, giving no directive does not mean do not cache. MDN says it is preferable to give every response a default Cache-Control header to avoid heuristic caching. The starting point, not only for signed-in pages, is to check across the site that no responses are left without a directive.
Operationally, a list of which directive each page of the application returns makes checking and handover easier. Separate pages that require sign-in, pages whose content changes depending on sign-in, and pages that are the same for everyone, and decide which directive each should return. Check the values frameworks add by default against this list.
FROM PRIMARY SOURCES
private: do not share personalised responses
private indicates that a response may be stored only in a private cache, that is, the browser cache. MDN says you should add private to user-personalised content, especially responses received after login and for sessions managed via cookies. CDNs and proxies then do not store the response, and only the browser can store it for that user.
MDN warns that if you forget private on a personalised response, it can be stored in a shared cache and reused for multiple users, which can cause personal information to leak. private is not a directive to slow pages down but a marker for responses that must not be shared. Make it a rule to add it, without exception, to responses of pages that require sign-in.
Watch the relationship with public. According to MDN, responses to requests with an Authorization header must not be stored in a shared cache, but public causes such responses to be stored there. There is normally no reason to add public to pages that require authentication. When copying configuration templates, check that public meant for static files has not spread to signed-in pages.
Responses marked private are still stored by the browser. For business systems that may be used on shared devices, or services that show highly sensitive information, you may want to avoid browser storage too. That decision is handled with no-store, covered next.
private applies to more than page HTML. Apply the same thinking to API responses called behind signed-in pages, per-user file downloads and partial responses used to replace parts of a page. Marking only the page HTML private while API responses carry nothing is a typical oversight in checks.
Sources: [1]
FROM PRIMARY SOURCES
The difference between no-store and no-cache
no-store tells caches of any kind, private or shared, not to store the response. As MDN explains, it is the strongest directive because nothing stores it. Use it for responses that should remain nowhere, such as payment confirmation, personal detail pages or admin screens. Because every request then goes back to the server, choose targets while balancing speed.
no-cache is easily confused because of its name. MDN states clearly that no-cache does not mean do not cache. It allows caches to store a response but requires them to revalidate it with the origin before each reuse. If what you mean is do not store, the directive to use is no-store.
no-cache suits cases where you want updates reflected immediately but want to reuse the stored response when nothing has changed. Revalidation uses ETag and similar mechanisms to check for changes, and if nothing changed it completes with a short response. But no-cache alone does not forbid storage in shared caches, so personalised content needs private as well, or no-store.
MDN also notes that no-cache and must-revalidate do not guarantee revalidation for history navigations such as the Back button. If seeing the previous page with the Back button after sign-out is a concern, decide page by page, including whether to use no-store. Writing in the design document what each directive guarantees and what it does not keeps the basis for decisions.
Sources: [1]
FROM PRIMARY SOURCES
Check the CDN's default behaviour
CDNs have their own defaults for handling headers from the origin. Cloudflare's documentation says it does not cache a resource when Cache-Control is private, no-store, no-cache or max-age=0, when a Set-Cookie header exists, or when the method is not GET. It also says the Cloudflare CDN does not cache HTML or JSON by default.
The same document also says Cloudflare does cache resources based on status codes even without a Cache-Control header, and that default caching is decided by file extension rather than MIME type. Rather than assuming defaults are safe, confirm concretely which responses are stored in your configuration.
Be especially careful when settings or rules that also cache HTML are added later for speed. Rules set in the CDN dashboard can take precedence over origin headers; Cloudflare's documentation also notes that Edge Cache TTL cache rules can override headers. If application and CDN are managed by different people, require both to review rule changes.
The same applies when switching CDNs or using several. Defaults differ by provider, so a response not stored by the old CDN may be stored by the new one. Always include in migration plans a check of how signed-in pages are handled.
Sources: [3]
FROM PRIMARY SOURCES
Use private instead of relying on Vary
The Vary header separates cached responses by request content. In MDN's example, when content differs by Accept-Language, adding Vary: Accept-Language stores responses separately per language. It tells caches which request headers a response depends on.
You might think signed-in pages could be separated per cookie. But MDN says that applications using cookies to prevent others from reusing cached personalised content should specify Cache-Control: private rather than specifying cookie in Vary. Cookie values differ per user, and splitting by Vary does not prevent personalised responses from being stored in a shared cache.
Vary suits differences with few possible values that anyone may see, such as language or compression format. It is not for values that distinguish users. In the design document, write what Vary specifies and why that suffices, and state that per-user differences are handled with private or no-store.
Be careful about listing many headers in Vary too. MDN explains that including headers with very many possible values, such as User-Agent, drastically reduces the chance that the cache is reused. A setting added to speed things up may end up having almost no effect. Decide Vary values from both the cache benefit and the differences that must be separated.
Sources: [2]
EDITORIAL PRACTICE
Confirming with real responses
Confirm settings in real responses. Record the response headers of major pages both signed out and signed in. Check the Cache-Control value, whether Set-Cookie is present, and the header the CDN adds to show cache status. Many CDNs add a header indicating whether a response came from cache, so record that as well.
Next, open the same URL with two different accounts and confirm that neither sees the other's content. Repeat this when you change CDN settings, update the application framework or add new pages. Pages whose content changes with sign-in, such as a home page that shows the user's name in part, are easy to miss, so always include them.
Store results with the per-page list. Recording which directive each page should return, which value was actually returned, and when and by whom it was checked lets you trace when settings broke if a problem occurs. Documenting the check procedure itself keeps the quality the same when staff change.
In case a personalised response turns out to have been stored in a shared cache, prepare procedures to purge the CDN cache and to investigate the scope of impact. Finding which URLs were stored from when to when and to whom they may have been returned requires records from both the CDN and the application. Decide how long to keep those records as well.
EDITORIAL PRACTICE
Conditions when delegating and judging completion
When delegating speed improvements or CDN adoption to an external developer or overseas team, do not make speed the only goal. State as conditions that signed-in pages return private or no-store, that every response sets Cache-Control explicitly, and that any CDN rule change is checked for its effect on signed-in pages.
Judge completion not only on a report that pages are faster but after receiving the two-account check results, records of response headers for major pages, and the list of CDN rules. Speed and cache safety are two sides of the same work. Declaring completion after checking only one side risks a major incident later.
Cache configuration needs review whenever pages are added or the CDN changes; it never really ends. That is why keeping the per-page directive list and the check procedure in a form that can be handed over is the foundation of operations. Manage speed improvements and the safeguards that keep users from seeing each other's pages on the same record.
WITH OPERUN.
Delegate everyday AI management.
Caches make pages faster, but misconfiguration can show one user another's page. Understand the difference between shared and private caches, mark signed-in responses private and responses that should remain nowhere no-store, and do not mistake no-cache for do not store. Set Cache-Control explicitly on every response and confirm the CDN's defaults and rules with real responses. Keeping this order in a per-page list and check records lets you keep both speed and safety in operations.
Discuss your product and AI workPrimary sources
Sources checked on 17 November 2026. The workflows and checklists are editorial proposals.
- [1]
- [2]
- [3]
Share this insight
