Inactive document invalidation API
- Category
- Miscellaneous
- Type
- New or changed feature
- Status
- In development (Chrome In development)
- Intent stage
- Start prototyping
Summary
An API that allows pages to declare triggers that will cause them to be invalidated (evicted from BFCache or cancelled from Prerendering). The goal is provide an alternative to blocking Prerendering or BFCache entirely (e.g. with Cache-Control: no-store) while still ensuring that sensitive information is not presented to the user after logging out or other important state changes. Triggers include changes to listed cookies or storage keys.
Motivation
When users log out, pages in BFCache or pages that are Prerendering may contain sensitive information that should no longer be accessible. Currently, or BFCache, sites use `Cache-Control: no-store` to protect that information but this is a blunt instrument that prevents BFCacheing entirely, hurting performance. For prerendering, sites may not opt in to prerendering. This also prevents browsers from opportunistically prerendering.
Standards & signals
- Firefox: No signal — This was discussed in the context of changing the default behaviour of BFCache with `Cache-Control: no-store`. The API itself didn't generate much discussion.
- Safari: No signal — This was discussed in the context of changing the default behaviour of BFCache with `Cache-Control: no-store`. The API itself didn't generate much discussion.
- Web developers: No signals
- Tracking bug: https://crbug.com/1386028
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=inactive-document-invalidation-api
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Inactive%20document%20invalidation%20API
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Inactive%20document%20invalidation%20API
- Baseline status: https://webstatus.dev/?q=Inactive%20document%20invalidation%20API
Explainers: https://github.com/fergald/explainer-bfcache-ccns/blob/main/api.md