📜 ⬆️ ⬇️

Changes regarding selector: visited in Firefox

The CSS selector :visited is a known danger when a malicious site can get to know what other sites you have visited before using a call to getComputedStyle() , and it can be done at a speed of up to 210 thousand checks per minute (in Safari much more).

Serious about privacy, we in Mozilla will soon be gathering to patch this hole. It is not yet known in which build of Firefox the following changes will be included, but you can get a closer look at them now:

- the function getComputedStyle (and functions such as querySelector ) will no longer be completely true. It will return such a value as if the user has never visited the specified 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, fill and stroke . Otherwise, the style that would be used for unvisited will be used to style the visited links. Also, to set the values ​​of the above CSS properties, you cannot use the rgba() and hsla() functions and use transparency with them.
')

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

We would like to know more about how you use the :visited selector and 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 these features. We ask in the comment .

Source: https://habr.com/ru/post/89537/


All Articles