Visited Links color not changing in IE 8

柔情痞子 提交于 2019-12-02 06:37:32

问题


I am having a problem with IE 8 where the visited links color do not change in our application.

We don’t have this problem with IE6. When using IE6, visited links changes its color if the link has been viewed before. Our application works fine with IE6 but with IE8 the visited link do not changes its color.

For information, I have cleared the history , unchecked the option "use Windows Colors" in the browser option. But the links in our application always remain unvisited.

Here is the CSS:

a:link {
    color : #006000;
}

a:visited {
    color : #3CB371;
}

Any help and suggestions would be greatly appreciated.


回答1:


There is a security issue with the :visited style.

To describe it briefly, it is possible for a malicious site to find out what sites you've visited by having links to all the sites it wants to check for, and then just examining the colours of those links.

This issue got a lot of publicity about three years ago, and as a result IE and all the other browsers released patches that disabled the :visited style.

I couldn't find a link that was specific to IE, but here's a link from Mozilla describing the problem and their solution for it in Firefox.

Older browsers (IE6, IE7) will still support the :visited style, but IE8 and all other current browsers do not.

Some of them do support it as a user-configurable option, but defaulting to switched off, but very few users will have switched it on, so you can basically ignore that.

More recently, some browsers have re-enabled the style, but changed the Javascript getComputedStyle() function so that it ignores the visited style. This allows the end user to see the visited colour but prevents the potential for a hacker to find out the information. I don't think IE8 ever got this update.



来源:https://stackoverflow.com/questions/15620122/visited-links-color-not-changing-in-ie-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!