Forum Moderators: open

Message Too Old, No Replies

Visited Links

unwanted state

         

fashezee

4:05 am on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have given my links a visited state which I would like active only during the
user's session. Should the user re-visit the site in a week, I would like the
links to have their link state? Should I disallow the page to be cached? if so how?

What is the best solution?

Brett_Tabke

4:12 am on Jan 13, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Even if it isn't cached, visited links are stored differently and will still show as visited. I don't think there is a way to do what you want short of changing the urls via a session id or some other cgi based url.

dingman

6:16 am on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



May I ask why you want to do this? If I'm returning to a site I visited a short while ago, it's usually because I remember finding something valuable there, or am coming back to make a purchase. I'll often use link status to help me re-trace my steps.

Heck, I have a site that uses session IDs in the URLs and as a result I had to specifically write in a system to artificially reproduce the link status indicator for some sections. (All users are logged in, or they can't see anything, which makes this possible.)

fashezee

1:29 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Reason:
My Portfolio Page consists of over 24 links that when clicked on will
display a different piece of artwork. I would like to reset the links to their
original state should a user return to view my portfolio page at a later session.

DrDoc

7:54 pm on Jan 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, you can easily do it if the links are generated by javascript ..

Just add the current time tot he link.

instead of:
www.example.com/portfolio.html

do this:
<script type="text/javascript">
rightnow=new Date;
document.write('<a href="http://www.example.com/portfolio.html?'+rightnow+'">linktext</a>');
</script>

or, if you want it to be just for today, or this hour, add the applicable line in the script after the rightnow=new Date; statement.

For example:
thetime=new Date;
rightnow=thetime.getHours();

or

thetime=new Date;
rightnow=thetime.getDay();