Links showing as being visited

Ive got a nav bar using a SPRITE, I also have a small sitemap at the bottom of my page.

When I click on one of the nav links, it shows that same link that’s in the sitemap as being visited becuase it changes color, however I didn’t actually click on that link.

What is going on here?

Why is it weird? They’ve been to that page so it shows as visited - whether they clicked the link in the top bar, the link in the footer, a bookmark or a link from another site, they’ve still been to that page.

Hey all,

I definitely want people to know where they’ve been!

But it seems weird to me that if they click about us on the navigation bar, the about us link at the bottom of the site is highlighted as if they had clicked that exact link… right?

Maybe i’ll just take off all visited decoration for the sitemap?

Why would you want a way round it? The reason for having :visited is so that your users can see which pages they’ve already looked at and which they haven’t. That’s more important to them than knowing they’ve clicked on a particular link on a particular page.

That said, there is a way round it, and sometimes it’s useful to be able to look in the logs and see where clicks have come from. This is exactly what Facebook does with some of its links. Just add a query to the end of the URL.

So instead of <a href=“info.htm”>, change it to <a href=“info.htm?referrer=navbar”> or <a href=“info.htm?referrer=sitemap”> and so on. If the page is static, the server will simply ignore the queries and serve the page as normal. It allows you to track where people have clicked, and it will only show links as visited when someone has been to that page through the same route. On the downside, it does mean that your users can’t easily see which pages they’ve been to before, which is the main point of :visited.

css a:visited

Bades is using CSS pseudo-classes, that’s why some links are shown as visited. It makes no difference whether you use the vlink attribute on <body> are use a:visited in the CSS, both apply in the same situations.

If visitors start clicking on links that don’t look like they have been visited before and find themselves on a page they have already seen they will curse you and all your toes will drop off.

Use css to give the visted link the color you want
You can finfd more info and examples at

Is there anyway around that?

It changes color because you visited the page that link points to. The fact that you didn’t physically click on that particular link in your page doesn’t make a difference.