關於 CSS 中 :visited 的隱私問題_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:57:02
Original
1235 people have browsed it

在七年半前 (2008 年八月) 寫的「 利用 CSS 產生的隱私問題」文章,最近好像是因為 Rplus Chen在 Facebook上的 這邊提到而又有不少點擊進來,不過這個問題在 2010 年左右已經被解決了。

可以參考 MDN上「 :visited - CSS」的說明,以及當時 Mozilla所發佈的文章:「 privacy-related changes coming to CSS :visited」。

由於隱私問題,Mozilla 的作法是限制 :visited可以改變的項目,只剩下少數與呈現方式有關的屬性可以用:

For privacy reasons, browsers strictly limit the styles you can apply using an element selected by this pseudo-class: only color, background-color, border-color, border-bottom-color, border-left-color, border-right-color, border-top-color, outline-color, column-rule-color, filland stroke.

另外各種想要取得 :visited的 CSS 資訊的方法,也會以沒有瀏覽過該網站重新計算,並且傳回假資料以確保還是不會洩漏:

The first change is that Gecko will lie to web applications under certain circumstances. In particular, getComputedStyle()and similar functions such as element.querySelector()always return values indicating that a user has never visited any of the links on a page.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template