dcsimg
www.webdeveloper.com
Results 1 to 12 of 12

Thread: How do I show visited link color as it was not visited on each visit to page?

  1. #1
    Join Date
    Dec 2008
    Posts
    6

    How do I show visited link color as it was not visited on each visit to page?

    Hi.

    How do I show visited link color as it was not visited on each visit to page?

    Each time someone visits the page I want all the links not to show up in the visited color (state).

    But I still want the visited color to show up (the normal way) if the user right click the link and open the URL in a new page.
    If user now click on the page where he came from again then I want the visited colors to be in visited color.

    How do I make this work?

  2. #2
    Join Date
    Nov 2008
    Posts
    2,477
    I dont understand what you are asking. Can you clarify?

  3. #3
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,219
    Most browsers, like mine, remembers which links I have visited. I have to reset visted links if I wish, but other user's may have to clear their cache of all your site pages to get them restored to "pristine" colors.

  4. #4
    Join Date
    Dec 2008
    Posts
    6
    It is quite simple... (my question might not have been )
    I try again.

    Let say you have visited a page earler which have a lots of links.
    If you have visited any of these links earlier then those visited links normally should show in the Visited link color.

    What I wanted was that If I open that page again laiter on... then I would not like to see the visited links in using the Visited color, but just the color as if I had not visited those links earlier.

    But If I right-clicked a link to open link URL in new window then my clicked link should show in visited color when I look at (not reopen) the page with those links again.

    Hope that clarified it.....

    Anyway... I have solved it.
    If I want to do what I want for each refresh (reopen) of that page I could just add a timestamp somewhere in the URL like this: (simplified but you get the picture)
    $tsTime = time();
    ... href=\"scriptname.php?ts=$tsTme\" ...

    or to make the visited color last for the whole session then I could do like this:
    $tsTime = session_id();
    ... href=\"scriptname.php?ts=$tsTme\" ...

    I uses PHP here...

    Anyway thanks for asking

    Regards

  5. #5
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,219
    I would be interested to see if my browser would show the links as you have set up as I control what it does to a certain extent. I control the cookies, the Java, the JavaScript, the illegal redirects some sites try to make it do and more.

  6. #6
    Join Date
    Dec 2008
    Posts
    6
    If you are thinking about testing my page in your browser.....

    Not possible... It is a closed web application for a customer of mine.

    But should be quite easy for you to make a page and test it.
    But requires that you use some kind of scripting language on the server in order to create the ts on each of the links though....

    Regards

  7. #7
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,219
    Nah. Haven't the time time to do all that. Just wanted to see if your page would reset my visited links which I don't think it will.

  8. #8
    Join Date
    Dec 2008
    Posts
    6
    I belive it will....

    Because of the added timestamp to the URL, which make the link URL different from your previous visit on the page....

    It works for me... why should it not work for you

    Regards

  9. #9
    Join Date
    Nov 2008
    Posts
    2,477
    That seems like a lot of hassle and messy urls when you could just use a tiny bit of JS to change the colour of a link onclick. May not be an issue for you as its a closed app but your approach is very search engine unfiendly.

  10. #10
    Join Date
    Dec 2008
    Posts
    6
    Works great for my customer and this web-app is not search enginable anyway

  11. #11
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,219
    Quote Originally Posted by bongobongo View Post
    I belive it will....

    Because of the added timestamp to the URL, which make the link URL different from your previous visit on the page....

    It works for me... why should it not work for you

    Regards
    Because I control what my browser does, not a web site.

  12. #12
    Join Date
    Dec 2008
    Posts
    6
    Quote Originally Posted by Major Payne View Post
    Because I control what my browser does, not a web site.
    Then maybe you should test it then before you claim it would not work on your browser..... If a unique URL shows up each time, then I wonder how on earth could you possibly make your browser remember visited URL's ????

    Please clarify!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles