Changes regarding selector: visited in Firefox

Original author: Christopher Blizzard
  • Transfer
The CSS selector :visitedis a known danger when a malicious site can use a call getComputedStyle()to find out what other sites you have visited before, and do it at a speed of up to 210 thousand checks per minute (there are much more in Safari).

Serious of privacy, we at Mozilla are about to patch this hole soon. It is still unknown in which Firefox build the following changes will be included, but you can look at them now:

- the function getComputedStyle(and such functions as querySelector) from now on will not tell the whole truth. It will return such value as if the user never visited the set address;
- visited links can still be styled in their own way, but only with a limited set of CSS properties:color, background-color, border-*-color, outline-color, filland stroke. Otherwise, for styling the visited links, the style that would be used for unvisited ones will be used. Also, to set the above-stated CSS-property values, you can not use the functions rgba()and hsla()and use transparency to them.


The impact on web design should be minimal, but something needs to be changed:
- if you use background images to style the visited links, this will no longer work;
- We will no longer support CSS transitions regarding visited links. Fortunately, these transitions are not used as often, so few will suffer, but they will.

We would like to know more about how you use the selector.:visitedand how the changes described will affect your sites. If you think that these changes will seriously violate something, we would like to at least document such features. Please comment .

Also popular now: