Visited link (:visited) history sniffing
Used to detect which links the person had visited by styling :visited links.
In one line
Can't find which links you visited by testing link colours anymore
Used to detect which links the person had visited by styling :visited links.
Browsers lie to getComputedStyle for :visited since 2010, but timing, scroll and rendering side channels remained. Chrome 136 partitions :visited links, ending cross-site history probing.
What it can and can't do
What the user does: Nothing. Chrome 136 and other browsers already block it
It can
- Show visited links in a different colour that you can see
- Try timing and scroll tricks, which now work far less in current browsers
It cannot
- See which sites you visited from link colours
- Work across sites in Chrome 136 and later
- Work in Firefox and Safari, which hide the answer
How it differs between platforms: Chrome 136 now keeps visited links separate per site. Firefox and Safari blocked the main trick earlier.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Removed | 136 | 2025-04-29 | Partitioned :visited links |
| Edge | Removed | 136 | 2025-05-01 | Partitioned :visited links |
| Firefox | Removed | 4 | 2011-03-22 | getComputedStyle protections since 4 (2010) |
| Safari | Removed | 5 | 2010-06-07 | Protections since 5 (2010) |
| Safari on iPhone | Removed | 5 | 2011-10-12 | Protections since 5 (2010) |
| Chrome on Android | Removed | 136 | 2025-04-29 | Partitioned :visited links |
| Samsung Internet | Removed | 29.0 | 2025-10-25 | Partitioned :visited links |
How a site asks for it
| API | :visited CSS; getComputedStyle; paint timing; scroll-to-text |
| How access is granted | none |
| What the user sees | Not listed |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Not listed |
| How to take it back | Not listed |
| Inside an iframe | Not listed |
Typical flow
- Render a link
- Check style or timing for visited state
- Repeat per candidate URL
Data you get
What comes back: Per URL visited bit
Shape: boolean
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
visited | boolean | None | true or false | per URL |
Technical limits
- Same-site history probing still possible if site is the history owner
- Lie-based mitigation not perfect for rendering side channels
The story
What it is
Old trick: a site styled links so visited and unvisited ones looked different, then read which pages you had seen.
For you
Today you are mostly protected. Browsers tell pages that every link looks unvisited, so a page cannot learn which sites you saw. It is why visited links only change color on your own screen.
For makers
In the past, ad and data sellers used it to learn which banks, shops or news sites a visitor had been to. Browsers fixed it around 2010 and later, so it now works as a security lesson more than a tool.
Where you see it
| Type | Example | Apps |
|---|---|---|
| security | Before the fix, a malicious page could list which bank sites you had visited by testing their links. | None named |
| ads | Older ad scripts checked which shopping sites you visited to target ads. | None named |
| shopping | A store could check for competitor links in your history to adjust its price or coupon. | None named |
| social | A social network could guess your interests from visited links to other sites. | None named |
| news | A news site could see if you had read a rival's story, and tailor its message. | None named |
| developer | Browser makers lock down which styles can use visited links, so apps still show purple links but pages cannot read them. | Chrome, Firefox, Safari |
| education | A security course shows how the old attack worked to explain browser privacy design. | None named |
Risks
- Fixed in modern browsers
- Old browsers still exposed
What the platform says
- MDN: Privacy and the :visited selector. MDN explains how browsers limit what styles can apply to visited links, so sites cannot see your history.
Good uses and abuse
Legitimate uses
- None
Known abuse
- History sniffing, login detection
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 3 of 5 | How revealing the data is |
| Utility | 1 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 4 | Rough identifying entropy, when known |
History
- 2010-03, Firefox 4: getComputedStyle lies for :visited (Baron)
- 2025-04, Chrome 136: Partitioned :visited link history by top frame and link origin
Related capabilities
Related
- Cache timing history sniffing. Can time how fast something loads to guess if you visited a site before
Sources
How well checked: Based on official documentation.