2010 年,主要浏览器 vendor 修补了一个允许嗅探用户历史记录的漏洞:Mozilla to Tackle Browser CSS History Privacy Leak
建议的解决方案归结为以下几点:
Visited links can only be differentiated by color: foreground, background, outline, border, SVG stroke, and fill colors.
All style rules for visited and unvisited links will be resolved at the same time, and before any link styles are applied.
When JavaScript is used to query the computed style of links, only the unvisited style values will be returned.
有一些known limitations .
问题是:在现代浏览器中是否没有通过 Javascript 选择已访问链接的已知方法?
最佳答案
没有。 (如果有,那是一个安全漏洞,可能不会长期存在。)
如果您只关心样式,您应该能够通过 CSS 实现它,但是通过屏幕上显示的内容应该是观察它被访问的唯一方式。
关于javascript - 在现代浏览器中是否没有已知的方法可以使用 jQuery 获取已访问的链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17687738/