Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing Hyperlinks

Status
Not open for further replies.

kaycee79

Technical User
Jan 10, 2004
82
GB
I have hyperlinks on my website, and to start of with, they are blue, but once a user has clicked on them, they change purple. Now, the question is, once a user has left the site, is it possible to change the hyperlinks to blue again, so they look as though they have been untouched?

Thanks in advance
 

You could do this server-side, by keeping track of which links the user has visited, and delivering them differently, only for that session (I believe this might be how Tek-Tips persists your link history across sessions).

But apart from that, I can't think of a way. Using CSS, you can do it, but when the user revisits the site, they'd stay that way.

Hope this helps,

Dan
 
what is CCS? and how would i do it on there?
 
CSS stands for Cascading Style Sheets. CSS lets you control how the content of your page looks.

To change the colour of your visited links, you'd use:

Code:
<html>
<head>
<style type=&quot;text/css&quot;>
a:link    { color: red;  }
a:visited { color: blue; }
</style>
</head>

<body>
Click <a href=&quot;[URL unfurl="true"]http://www.google.co.uk/&quot;>here</a>[/URL] to visit Google
</body>
</html>

Hope this helps!

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top