Stas Bichenko
Stas Bichenko

Reputation: 13283

Is there no known way to get visited links with jQuery in modern browsers?

In 2010 major browser vendors patched a hole that allowed sniffing through user's history: Mozilla to Tackle Browser CSS History Privacy Leak

The proposed solution boiled down to these points:

  1. Visited links can only be differentiated by color: foreground, background, outline, border, SVG stroke, and fill colors.

  2. All style rules for visited and unvisited links will be resolved at the same time, and before any link styles are applied.

  3. When JavaScript is used to query the computed style of links, only the unvisited style values will be returned.

There are some known limitations.

The question is: Is there no known way to select visited links via Javascript in modern browsers?

Upvotes: 1

Views: 1115

Answers (1)

gsnedders
gsnedders

Reputation: 5702

No. (If there is, it's a security bug and probably won't exist for long.)

If all you care about is styling, you should be able to achieve it through CSS, but through what is displayed on screen should be the only way to observe it being visited.

Upvotes: 1

Related Questions