Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long will a browser remember a "a:visited" link?

How long will a browser remember a "a:visited" link? Assuming the method isn't uniform across browsers - an answer for any individual browser (or as many as you know) would be helpful.

Also, under which type of memory is it stored? "Web History"? Cache?

like image 316
Matrym Avatar asked May 01 '10 22:05

Matrym


People also ask

How can I tell if a link has been visited?

You can parse all links on the page and and get their CSS color property. If a color of the link is a match to the color of unvisited link you defined in CSS the this link is unvisited. This kind of technique usually used to determine all visited links.

What is the difference between link and visited?

a:link if for an unvisited link, while a:visited is for a link that the user has visited. Usually the user will want some way to differentiate between the two in which case you'll style them separately.

What does a visited do?

The :visited CSS pseudo-class represents links that the user has already visited. For privacy reasons, the styles that can be modified using this selector are very limited.


2 Answers

Visited links are part of your web history, and how long they're stored depends on each user's individual browser settings. I believe Firefox remembers unlimited history by default, but anyone can set a time limit on it, or have it be cleared every time they close their browser, etc.

like image 168
tzaman Avatar answered Sep 28 '22 07:09

tzaman


Usually, it's :visited if the url is in the browser's history, this is pretty consistent across browsers. How long?...however long history is stored, which varies greatly depending on preferences. Also, if the user's in any sort of privacy mode, history is typically disabled, meaning no links are "visited".

like image 29
Nick Craver Avatar answered Sep 28 '22 06:09

Nick Craver