469,623 Members | 1,455 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

Disable client browser's Back/Forward button?

Is there any way to disable the client browser "Back" and "Forward"
buttons while on my site? Or how would I go about knowing that a page
hit is caused by a back/forward navigation?

I have discovered that my web app is definately NOT Back/Forward safe.
It's really messing with my SQL data bigtime.

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
1 5805
There is no good way to disable the buttons.
If you pop open a new browser window you can hide the buttons but the user
can still navigate with the keyboard.
If you pop open a new browser windows then the back button will be disabled
because that window has no history.

A better approach is to disable caching so a the page must be requested
fresh each time.
Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Terry Olsen" <to******@hotmail.com> wrote in message
news:u6***************@TK2MSFTNGP15.phx.gbl...
Is there any way to disable the client browser "Back" and "Forward"
buttons while on my site? Or how would I go about knowing that a page
hit is caused by a back/forward navigation?

I have discovered that my web app is definately NOT Back/Forward safe.
It's really messing with my SQL data bigtime.

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ashvin Navare | last post: by
3 posts views Thread by Paul | last post: by
12 posts views Thread by ShepardBerry | last post: by
16 posts views Thread by Barry Gilmore | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.