By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,381 Members | 1,626 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,381 IT Pros & Developers. It's quick & easy.

Replacing entries in the History

P: n/a
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


Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Wed, 2 Jul 2003 12:07:17 +0100, "MAL" <no******@here.co.uk> wrote:
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.]
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2

P: n/a
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" <ji*@jibbering.com> wrote in message
news:3f**************@news.cis.dfn.de...
On Wed, 2 Jul 2003 12:07:17 +0100, "MAL" <no******@here.co.uk> wrote:
I need to Replace the current entry in the History list with a new randomlygenrated 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.]
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #3

P: n/a
On Wed, 2 Jul 2003 12:36:54 +0100, "MAL" <no******@here.co.uk> wrote:
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.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.