# is it possible in java/php/asp to make a page 'forget' visited links for a single page?

**URL:** <https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975>\
**Category:** Factual Questions\
**Created:** [February 14, 2010, 6:29pm UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975 "2010-02-14T18:29:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lobsang](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lobsang/32/4067_2.png) [@Lobsang](https://boards.straightdope.com/u/Lobsang)\
**Post date:** [February 14, 2010, 6:29pm UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/1 "2010-02-14T18:29:04Z")

</div>

I am trying out “CSS Sprites” (using one file to reperesent a page’s button graphics in various states) and I made a page that has a different image for link, hover, and visited.

When I click the link I can no longer see what the unvisited link looks like.

Is there a code way to tell a browser to “forget what links have been clicked on on this page”?

Preferably I’d like a html way, but failing that - javascript, asp, or php.

Thanks.

---

<div class="post-metadata">

**Author:** ![Lobsang](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lobsang/32/4067_2.png) [@Lobsang](https://boards.straightdope.com/u/Lobsang)\
**Post date:** [February 14, 2010, 8:01pm UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/2 "2010-02-14T20:01:21Z")

</div>

And to save opening another thread. Is it possible to hide the cursor in internet explorer 8?

Both of these work in firefox…

cursor: url(blank.gif), default;

cursor:none;  
but none of them work in ie. It just shows the pointer.

I know there are no code errors because if I replace ‘none’ with something visible like ‘hand’ or ‘help’ it will correctly show those in ie.

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [February 14, 2010, 8:34pm UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/3 "2010-02-14T20:34:57Z")

</div>

> [@Lobsang](#):
>
> And to save opening another thread. Is it possible to hide the cursor in internet explorer 8?
> 
> Both of these work in firefox…
> 
> cursor: url(blank.gif), default;
> 
> cursor:none;  
> but none of them work in ie. It just shows the pointer.
> 
> I know there are no code errors because if I replace ‘none’ with something visible like ‘hand’ or ‘help’ it will correctly show those in ie.

Not sure about IE8, but IE7 doesn’t accept GIF cursor file types; convert the .gif to a .cur and it will work.

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [February 14, 2010, 8:56pm UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/4 "2010-02-14T20:56:02Z")

</div>

> [@Lobsang](#):
>
> Is there a code way to tell a browser to “forget what links have been clicked on on this page”?

I doubt if there’s any way to actually delete history entries in any cross-browser way. You could probably do it with a nonportable script in your browser of choice, though I don’t know how.

An easier way might be to tell your server to add a random query string (or the date and time, or whatever) to the links you’re interested in, so that every time you reload the page you get a URL you haven’t seen before. That is, rather than \<a href=“link.html”\>…\</a\> you have \<a href=“link.html?20100214123456”\>…\</a\>.

---

<div class="post-metadata">

**Author:** ![Lobsang](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lobsang/32/4067_2.png) [@Lobsang](https://boards.straightdope.com/u/Lobsang)\
**Post date:** [February 14, 2010, 9:00pm UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/5 "2010-02-14T21:00:47Z")

</div>

> [@Omphaloskeptic](#):
>
> Not sure about IE8, but IE7 doesn’t accept GIF cursor file types; convert the .gif to a .cur and it will work.

Thanks. That worked. (I happen to have a copy of visual studio on the computer I’m using and that has a cursor editor)  
And thanks for answering about the forgetting visited links question.

---

<div class="post-metadata">

**Author:** ![\_cc](https://avatars.discourse-cdn.com/v4/letter/_/e19b73/32.png) [@\_cc](https://boards.straightdope.com/u/_cc)\
**Post date:** [February 16, 2010, 3:53am UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/6 "2010-02-16T03:53:53Z")

</div>

Why would you have a different sprite state for a visited link if you don’t want users to see the “visited” version of the link? If you have some conditional that determines whether or not the user should see the visited, you could just use two seperate classnames or ids, such as

a.ok\_to\_show\_visited {  
background: something;  
}  
a.ok\_to\_show\_visited:visited {  
background: something different;  
}  
a.not\_ok {  
background: something;  
}

---

<div class="post-metadata">

**Author:** ![Lobsang](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lobsang/32/4067_2.png) [@Lobsang](https://boards.straightdope.com/u/Lobsang)\
**Post date:** [February 16, 2010, 4:22am UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/7 "2010-02-16T04:22:51Z")

</div>

> [@'\[cc](#):
>
> ;12122747’]Why would you have a different sprite state for a visited link if you don’t want users to see the “visited” version of the link? If you have some conditional that determines whether or not the user should see the visited, you could just use two seperate classnames or ids, such as
> 
> a.ok\_to\_show\_visited {  
> background: something;  
> }  
> a.ok\_to\_show\_visited:visited {  
> background: something different;  
> }  
> a.not\_ok {  
> background: something;  
> }

I didn’t _not_ want the users to see visited links. I wanted them to be able to reset the page. It was simply a demonstration of the sprite technique. A user could see link image. They could hover over it to see the hover image. They could click it to see the visited image. And finally they could reset the page to go back to being able to see the link image.

---

<div class="post-metadata">

**Author:** ![Omphaloskeptic](https://avatars.discourse-cdn.com/v4/letter/o/bcef8e/32.png) [@Omphaloskeptic](https://boards.straightdope.com/u/Omphaloskeptic)\
**Post date:** [February 16, 2010, 5:18am UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/8 "2010-02-16T05:18:18Z")

</div>

> [@Lobsang](#):
>
> I didn’t _not_ want the users to see visited links. I wanted them to be able to reset the page. It was simply a demonstration of the sprite technique. A user could see link image. They could hover over it to see the hover image. They could click it to see the visited image. And finally they could reset the page to go back to being able to see the link image.

Not sure if you’ve solved your problem yet, but I should say (since I forgot to mention it above) that you can do the same link-decoration technique I mentioned earlier using JavaScript, entirely on the client side. This is probably a nicer method if you want users to be able to do it (reduces server load by not requiring refreshes).

---

<div class="post-metadata">

**Author:** ![obfusciatrist](https://avatars.discourse-cdn.com/v4/letter/o/4af34b/32.png) [@obfusciatrist](https://boards.straightdope.com/u/obfusciatrist)\
**Post date:** [February 16, 2010, 5:27am UTC](https://boards.straightdope.com/t/is-it-possible-in-java-php-asp-to-make-a-page-forget-visited-links-for-a-single-page/528975/9 "2010-02-16T05:27:45Z")

</div>

Don’t know the answer to the question but if it is just for demonstration purposes could you use javascript or PHP to generate a random URL string each time the page is loaded so that there’s always an unvisited link on the page?
