Hmm, I guess this doesn't entirely apply to the PHP section, but I figure that the peoplein the PHP section should know of this better than in the HTML section.
So, what I want is simply, I want to be able to send links by email to people, but when they are clicked, they should not be stored in history... however, I've looked through all the headers and didn't see anything really applicable.
The only thing that came to my mind is to respond with 404 but still output a page, as the browser would take it to be incorrect and not store it, however, I also know that this could be quite troublesome to some browsers as some fancy their own error pages more (and really defies the purpose with 404).
Does anyone know if there is another (better) way to force an URL not to be stored in the history?
Preventing links to make history
Moderator: General Moderators
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
some were suggesting that location.replace can replace the existing href which might erase the existing location.href value....subsequently means overwriting the last url copied to the history object
they did something like this...
they did something like this...
Code: Select all
<A HREF="newPage.html" ONCLICK="location.replace(this.href); return false;" >new page</A>