concept

Visited link privacy — CSS reference

Browsers restrict visited-link styling to a limited set of color-related properties and mask script-observable values to reduce history disclosure. Do not use visited state for application logic or as an authorization mechanism. This example supplies an ordinary link and checks the unvisited reported color. No navigation or history inspection is attempted.

Formal Syntax & Structure

css syntaxcss
a:link { color: blue; } a:visited { color: purple; }

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>visited-link-privacy</title><style>body{margin:8px;font:16px/1.5 sans-serif;color:black;background:white}#a{box-sizing:border-box}a:link{color:blue}a:visited{color:purple}</style><body><a id="a" href="#details">Details</a><p id="details">Information</p></body></html>
CSS Reference