# Caching of personalised pages
*Cookies & privacy*
Do not mark pages that depend on a cookie as publicly cacheable.

## Why it matters
If a logged-in page is cached publicly, the next visitor can be shown someone else's page.
This is rare but severe: it can expose names, emails, or account data through a shared cache. The fix is a header.

## How to fix it
1. Send Cache-Control: private, no-store for logged-in pages
2. Use a CDN rule that bypasses cache when a session cookie is present
3. Check that shared caches do not store the response

## Prompt for an AI assistant
Copy the text below and paste it into an AI assistant.
```text
You are the person improving this website. Check the item below and fix it if it applies to the site.

Item: Caching of personalised pages
Summary: Do not mark pages that depend on a cookie as publicly cacheable.
Steps:
1. Send Cache-Control: private, no-store for logged-in pages
2. Use a CDN rule that bypasses cache when a session cookie is present
3. Check that shared caches do not store the response
References:
- Cache-Control (MDN) (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)

Constraints:
- Keep the existing design and tone of voice.
- Show the file or section you changed and the suggested final wording.
- Do not decide ambiguous points alone; give options and a recommendation.
- Do not change anything outside the listed item.
```

## Checked by
- **[vuln](https://ismyappok.com/en/vuln/checks)** — Public exposure checks

## Related checks
- **[Cookie attributes](https://ismyappok.com/en/checks/cookie-attributes)** — Mark session cookies Secure and HttpOnly, and set SameSite so other sites cannot send them by accident.

## References
- **[Cache-Control (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)** — MDN (Mozilla) reference（Official）

## Check your site now
Enter a URL and find what is missing before launch, for free.
[Run audit](https://ismyappok.com/en/audit/check)