Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Detect visited links

Reply
Thread Tools

Detect visited links

 
 
aerotops
Guest
Posts: n/a
 
      03-28-2006
Hi,
Is there any way to detect which links on a page have been visited?

 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      03-28-2006

aerotops wrote:
> Hi,
> Is there any way to detect which links on a page have been visited?


by checking its .currentStyle (IE) / .computedStyle (Co) properties.
Say if you have set in CSS visited link to be backgroundColor purple
and the link in question is purple then guess which one is that

P.S. Lesser of course visitors with custom CSS set to override page
rules. Did not meet on practice but theoretically possible.

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      03-29-2006
VK wrote:

> aerotops wrote:
>> Is there any way to detect which links on a page have been visited?


Not directly. However, the :visited CSS selector applies to those links.
If you could modify the rule so that those elements are e.g. hidden, you
could use the

> [...] .currentStyle (IE) / .computedStyle (Co) properties.


where Co refers to UAs standards compliant in this regard to see if their
computed style would be display:none and the like. Compare Jesse
Ruderman's "hide visited" bookmarklet:

<URL:http://www.squarefree.com/bookmarklets/pagelinks.html>

> Say if you have set in CSS visited link to be backgroundColor purple
> and the link in question is purple then guess which one is that


The purple link could as well be the unvisited one.

> P.S. Lesser of course visitors with custom CSS set to override page
> rules.


Not necessarily.

> Did not meet on practice but theoretically possible.


It happens. Your answer, unfortunately as often, qualifies as from being
misleading to being wrong.


PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mozilla will not show links as 'visited' Ted Firefox 9 09-18-2006 07:54 PM
Visited links indicator not working Dave \Doc\ Corio Firefox 4 05-24-2005 01:12 AM
P.S. Problems with visited links being inconsistent Matt Stanley HTML 3 08-26-2004 05:58 AM
Problems with visited links being inconsistent Matt Stanley HTML 1 08-25-2004 11:59 PM
Visited links in a datagrid Jim Corey ASP .Net 3 05-26-2004 04:23 AM



Advertisments