|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Don't show page in browser historyHi
Is it possible to make sure that the page doesn't show in browser history and won't effect Back button. The problem is that every postback shows as another entry for "Back" button and user goes through the hole history of postbacks if she wants to get to previous page. Thank you, Shimon IF you don't want user to access the page by BACK button, then best would be
to disable CACHING of pages by client browser by adding prope meta tags on pages. You can try the following JS on each page and it should disable ability to use BACK button. <script language="javascript"> window.history.forward(1); </script> Show quoteHide quote "Shimon Sim" <shimonsim048@community.nospam> wrote in message news:e47J%23YlEGHA.376@TK2MSFTNGP12.phx.gbl... > Hi > Is it possible to make sure that the page doesn't show in browser history > and won't effect Back button. > The problem is that every postback shows as another entry for "Back" > button and user goes through the hole history of postbacks if she wants to > get to previous page. > Thank you, > Shimon > No he means that say he had page A and on there had a update button for
example and pressed it 3 times, thats 3 postbacks. When he presses back he has to press back 4 times (to get past the 3 postbacks) in order to get to the original page. I actually have the same annoying problem, i am sure there is a workaround, their must be. I think the smartnav directive may solve it (tho it is not crossbrowser but i think some peopl ehave made their own that is) or you could make your own back button and store the original page that started the chain as the target, combine that with the javascript from the previous post and they will have to use your back button. -- Show quoteHide quoteDan "Naveen K Kohli" <naveenko***@hotmail.com> wrote in message news:OYZUkknEGHA.3464@TK2MSFTNGP10.phx.gbl... > IF you don't want user to access the page by BACK button, then best would > be to disable CACHING of pages by client browser by adding prope meta tags > on pages. You can try the following JS on each page and it should disable > ability to use BACK button. > > <script language="javascript"> > window.history.forward(1); > </script> > > "Shimon Sim" <shimonsim048@community.nospam> wrote in message > news:e47J%23YlEGHA.376@TK2MSFTNGP12.phx.gbl... >> Hi >> Is it possible to make sure that the page doesn't show in browser history >> and won't effect Back button. >> The problem is that every postback shows as another entry for "Back" >> button and user goes through the hole history of postbacks if she wants >> to get to previous page. >> Thank you, >> Shimon >> > > Hi Shimon,
I assume you are using ASP.net 2.0. My suggestion is that we could place the code at the page to make it expire immediately. This way, when the user wanna click the back button at IE, it will report one page expire error message. Then he will have to focus on your page for the navigation. The sample code is: protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.ServerAndNoCache); Response.Cache.SetExpires(DateTime.Now.AddDays(-10)); } Please feel free to let me know if you have any further question on this issue. Best Regards, Wei-Dong XU Microsoft Support --------------------------------------------------------------------------- This posting is provided "AS IS" with no warranties, and confers no rights. --------------------------------------------------------------------------- It is my pleasure to be of any assistance.
Other interesting topics
HttpWeb Request from Class Library fails to 500
when debugging long delay before hitting breakpoint in page load How do I convert a DataSet to a String from a WebService asp.net 2.0 caching ASP.net 2.0 GridView edit mode problems Switching from http to https and back Issues with OnTextChanged using <asp:Repeater call functions by pointer? Interacting with Outlook synchronize folder contents |
|||||||||||||||||||||||