Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
59
rated 0 times [  63] [ 4]  / answers: 1 / hits: 9832  / 11 Years ago, sat, december 7, 2013, 12:00:00

I have successfully tested visited link effect on a tag for XHTML document.
But those visited link highlight with green color could not removed when I refresh the
address bar on my browser except I click clear up all browser cache and history on every browser. So the question is how to reset all css when click browser refresh button without clear up browser cache and history ?



So for my site I need to do something with php code to delete all cookie or history about those site I visited , Right ?



<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
<html xmlns=http://www.w3.org/1999/xhtml lang=en-US>
<head>
<style>
#checkvisited{width:730px;margin-left:0px;}
#checkvisited td a{text-decoration:none;color:gray;}
#checkvisited td a:link{color:gray}
#checkvisited td a:hover{text-decoration:underline}
#checkvisited td a:active{background-color:#DEB887}
#checkvisited td a:visited{color:green}
</style>
</head>
<body><div id='checkvisited'>
<table><td><a href=http://yahoo.com >AA</a></td><td><a href=http://yahoo.com? a=1>BB</a></td>
</table></div></body></html>

More From » html

 Answers
3

A visited link, i.e. one that gets picked up by the :visited pseudo-class, is one that is in the browser's history. So, the only way to turn those links back into non-visited links is to remove them from the browser's history.



Incidentally you don't need your a:link definition. :link is for highlighting non-visited links. Seeing as you have a base definition for a and a definition for a:visited, your a:link is redundant.



Here, however, is a proposed solution intended to defend against an attacker discovering a user's browser history by using getComputedClass to reveal all visited links in a page:



http://dbaron.org/mozilla/visited-privacy



(Almost certainly what you are looking for, but it's useful reading on the mechanics of :visited nonetheless)


[#49757] Friday, December 6, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mackennamelissac

Total Points: 110
Total Questions: 118
Total Answers: 103

Location: Sweden
Member since Sun, Jan 16, 2022
2 Years ago
;