Hi all, I'd like to clarify something here please, the inconsistent behaviour of browsers with regards to the pseudo class :visited. I had done quite a lot of research into it ont he web and it seems to me that every browser does something different. I appreciate this has a lot to do with security but in some instances it seems a bit awkward. Let me give you a few examples. I am working on a website at the moment, which is optimized to display in mobile browsers too. If I leave the defaults pseudo classes (meaning I don't change them at all and leave the defaul colour for links) I noticed that every browser seems to work fine, in that an unvisited link is blue and turns purple when visited. But, the moment I change those properties (and change them in the correct order of course) things go bananas. Take this fragment of code:
/*STYLED LINKS*/
a.myLink:link{
color:#c73085;
}
a.myLink:visited{
color:#08dff0;
}
a.myLink:hover{
color:#080808;
}
a.myLink:active{
color:#c73085;
}
/*STYLED LINKS*/
When this is applied to my css, only firefox, IE and opera seems to fully support it.The colour of the links changes ok the problem is only with visited links. Safari and Chrome behave in a very interesting way: if I click on the link, the colour doesn't change to visited and stays the same, but when I hover with the mouse on the clicked link, it changes to the right, visited colour. Even if I change the above toa.myLink:visited{color:#08dff0 !important;}
I don't see much difference. Now, this is only for desktop browsers of course, mobile browsers are even worse.
The w3c are somewhat vague http://www.w3.org/TR/css3-selectors/#the-link-pseudo-classes-link-and-visited
"Note: It is possible for style sheet authors to abuse the :link and :visited pseudo-classes to determine which sites a user has visited without the user's consent.
UAs may therefore treat all links as unvisited links, or implement other measures to preserve the user's privacy while rendering visited and unvisited links differently."
and I am not entirely sure how to interpret this because, as stated above, as long as you don't change the pseudo classes the visited/unvisited links colouring works ok, it's just when you change them that problems arise. I don't know whether I should waste more time trying to fix this behaviour or I should just forget about it. What do you guys think?