Detect visited links

Discussion in 'Javascript' started by aerotops, Mar 28, 2006.

  1. aerotops

    aerotops Guest

    Hi,
    Is there any way to detect which links on a page have been visited?
    aerotops, Mar 28, 2006
    #1
    1. Advertising

  2. aerotops

    VK Guest

    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.
    VK, Mar 28, 2006
    #2
    1. Advertising

  3. 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
    Thomas 'PointedEars' Lahn, Mar 29, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Corey

    Visited links in a datagrid

    Jim Corey, May 25, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    464
    Rick Spiewak
    May 26, 2004
  2. Matt Stanley
    Replies:
    1
    Views:
    673
    Dave Patton
    Aug 26, 2004
  3. Matt Stanley
    Replies:
    3
    Views:
    376
  4. Nospam
    Replies:
    22
    Views:
    1,202
    Beauregard T. Shagnasty
    Nov 3, 2005
  5. Peter J Ross
    Replies:
    5
    Views:
    537
    Peter J Ross
    Sep 2, 2007
Loading...

Share This Page