demo · v136
Visited Partitioning
Click a link to mark it visited from this origin, then look at the "partition key" that Chrome 136 stores. Same URL viewed from a different (top-level, frame) origin will not paint as visited.
rose & bold = your browser styled it as :visited from this origin.
same-site links (this origin)
cross-site links
partition key for THIS page
The same link URL is now keyed against this combination. A frame on another origin embedding the same URL would have a different key and would not paint as :visited.
link URL/v136/
top-level site
frame origin
cross-site iframe — should NOT paint as visited
Below, we embed this page's own URL inside an iframe served from data: (different origin). Click /v136/ above first, then look at the iframe — its /v136/ link is unvisited because the (top, frame) origin pair differs.
the code
// Pre-136: VisitedLinks hashtable keyed on URL alone
// key = hash(url)
// 136+: triple-keyed
// key = hash(url, top-level-site, frame-origin)
//
// So `a[href="https://example.com/"]:visited` only paints rose
// if THIS top-level site & frame origin clicked it before.
see also
- Partitioning :visited links history — feature index
- ChromeStatus entry
- Explainer