Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resetting visited status on links

Is there any way you can reset the visited status on links?

The scenario is this: On an intranet-site which naturally has a lot of links we want a link to have the status of "visited" for a set period of time only. I am therefore looking for a way to manipulate the visited status of links.

Is this doable? It should be cross-browser of course.

ETA: Client-side solutions are perfectly acceptable. Preferred even.. :-)

ETA-2: Cookies are allowed. No holds barred here :-)

like image 336
erlando Avatar asked Oct 20 '08 08:10

erlando


People also ask

How do I change the color of visited links?

If it's deselected (by default), you are good. Go to Step 2. Step 2: Now go to Content > Fonts & Colors > Colors. In the “Colors” windows, change the color of “Visited Links:” to your desired one, select Always in the drop-down menu, and click the “OK” button to save your changes.


Video Answer


2 Answers

Links appear as "visited" when the browser chooses to apply the :visited CSS pseudo-class.

The client-side way to reset links to the unvisited state is to (somehow) clear the browsing history. I would be very surprised to learn there is a portable way to do it. It also has unpleasant side effects such as crippling the behavior of history-sensitive smart location bars such as the one in Firefox 3.

As Drew Noakes suggested, a server-side way is to add some noise query parameters to the links, and periodically change the query parameter. This only gives a bad approximation of the behaviour you want. To get the "correct" behavior you'd need to track the history of visited pages per user server-side, so you can change the noise parameter for a specific page only after the requisite time.

All said, it's very probably a bad idea to actually try to "reset the visited status on links".

I think a better solution would be to tweak the page style so the :visited pseudo class renders the same as the :link pseudo-class. Then keep a server-side history of visited links per user, and adjust the display of links using an explicit visited class.

If you do not have the user identity handy, and do not want to require login, you can always use a random persistent cookie.

like image 64
ddaa Avatar answered Oct 06 '22 20:10

ddaa


i feel something smelly in the very idea.

what is the purpose of resetting link visited status? to notify that some new data is available? then maybe something more verbose like "NEW" image would be more appropriate?

on the other hand if you really need to do this - change the URL

like image 28
miceuz Avatar answered Oct 06 '22 21:10

miceuz