demo · v132
Triple-key partition explorer
The visited table is keyed by (link URL, top-level site, frame origin). Pick which entries are recorded, then see which :visited styles light up on a given page.
recorded entries in this user's history (simulated)
https://news.example/article-1(article-1, top=news.example, frame=news.example)visited
https://news.example/article-1(article-1, top=other-site, frame=widget.example)visited
looking at the page right now — what :visited lights up?
// the spec rule
function isVisitedFor(link, currentTop, currentFrame) {
return historyTable.has(
[link, currentTop, currentFrame]
);
}
// "self" carve-out: links to your own origin are :visited
// regardless of partition (no privacy gain in hiding them)
if (origin(link) === origin(currentFrame)) {
return historyTable.has([link, origin(link), origin(link)]);
}