Replacing entries in the History


M

MAL

Hi

I need to Replace the current entry in the History list with a new randomly
genrated URL BEFORE following the link being clicked. I want to use the
onclick property, replace the current History entry witha new one, then
follow the link being clicked which generates a new history entry.

Then when a user clicks the back button they will go to the randomly
generated page.

Can someone help with a piece of code.

Many thanks

Mark
 
Ad

Advertisements

J

Jim Ley

I need to Replace the current entry in the History list with a new randomly
genrated URL BEFORE following the link being clicked. I want to use the
onclick property, replace the current History entry witha new one, then
follow the link being clicked which generates a new history entry.

The history list is exactly that a history, I don't believe what
you're suggesting is even possible in a secure environment *, let
alone in a non-secure client-side javascript one. You can't mess with
such fundamental things.

You certainly don't _need_ it, why not tell us your actual problem
rather than a problem some crazy solution requires.

Jim.

* [actually it is you could actually navigate to the random page,
replacing the entry, then navigate to the one you want.]
 
M

MAL

Thanks Jim

OK the "ACTUAL" problem is that after using all the normal methods of
preventing pages being cached like

Response.Expires = 15
Response.ExpiresAbsolute = Now() - 2
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cachecontrol","private"
Response.AddHeader "Cache-Control", "must-revalidate"
Response.CacheControl = "no-cache"

etc

When a user is connected via a proxy server the above is ignored.

I have also tried the method of appending a random string to my asp page
after the ? in an attempt to fox the proxy servers into not being able to
find the page... but it doesnt work either when a user clciks the back
button to go back to the page.

I need the page to reload when a user clciks the back button, because our
database will have recorded the fact thet they have clicked on a link on the
page and the recordset has changed and needs to be redispalyed correctly.

Thanks.

Mark

Jim Ley said:
I need to Replace the current entry in the History list with a new randomly
genrated URL BEFORE following the link being clicked. I want to use the
onclick property, replace the current History entry witha new one, then
follow the link being clicked which generates a new history entry.

The history list is exactly that a history, I don't believe what
you're suggesting is even possible in a secure environment *, let
alone in a non-secure client-side javascript one. You can't mess with
such fundamental things.

You certainly don't _need_ it, why not tell us your actual problem
rather than a problem some crazy solution requires.

Jim.

* [actually it is you could actually navigate to the random page,
replacing the entry, then navigate to the one you want.]
 
Ad

Advertisements

J

Jim Ley

When a user is connected via a proxy server the above is ignored.

When going "back" to a page in the history, a new request is
explicitly forbidden by HTTP specification. the history, is exactly
that a history. It should not be different.

Are you sure you need this, people understand what back button means,
and do not expect things to be different, if you only need it to make
it easier on your server side scripts (which most people ask this
question for IME) then simply improve those, you have full control
there.

Jim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top