Add an URL to browser-history using JavaScript?

In a web-application people can create news docs that are basically a newsmessage or a link to internal/external doc.

These news docs are diplayed in a list and if a person clicks on a news doc that is a link, the user should be directed to the external page.

Nothing fancy, BUT when the user should use the back button the link should be displayed as ‘default read’.

One option is to perform a redirect of 0 seconds but this looks kinda ugly and 90’s.

My wish would be to add an URL to the browser-history programmatically using JS but I fear the access to the history class is restricted:

-You cannot add an entry to the History list through script.

-Actually, you can’t even read the History list through script.

-The only things exposed are the back(), forward(), and go() methods (and the .length property).

(htmlforums.com)

DOES ANYONE HAVE AN IDEA?

Subject: Add an URL to browser-history using JavaScript ?

I have two ideas that are, however, probably not your case. Posting it here anyways:

  1. CSS. Just by chance - is the CSS for read links the same as for unread links?

  2. Command used when opening the docs. It is like when you use Javascript with location.href=, it adds a history entry, while location.(replace) do not add one.

I googled a bit and maybe these links can help:

http://www.siteexperts.com/tips/functions/ts14/page1.asp

http://fy.chalmers.se/~appro/hcntl/

Subject: Add an URL to browser-history using JavaScript ?

Odd - visited links should display as visited. That applies even if you open a link in a new window and keep looking at the current window – as soon as the 200 status is returned, the link should change to the visited style. The back button should have nothing t do with it, since nothing on your page tells the browser whether or not it has been to a particular location. Have you tried checking the CSS to make sure that the :visited pseudoclass isn’t overriding the normal visited appearance with the :link value?