Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I Remove a cached page from the browsers previous/next button c 1

Status
Not open for further replies.

wdp

Programmer
Nov 25, 2002
16
0
0
GB
Does anybody know how to remove a previously visited aspx page from the client browser instantly.
I am using a data entry form which i want removed from memory when the user leaves the form from either a submit button or by pressing the Back button. only the Submit button works.

 
dwp,

In your ASP.NET code set ' Response.Expires = 0 ' to not allow your Browser to cache pages.

S.

(The more ASP.NET I do, the more Javascript I find myself using)




 
No, It is now, still no change. The update/submit button is and has been working correctly but the main problem is that
I want it to be removed from the clients browsers toolbar Back button.
 
From faq855-3257 to disable the back button:

-----------------------------------------------
DISABLE THE BACK BUTTON ON A BROWSER
-----------------------------------------------

Sometimes, you don't want a user pressing the "Back" button in your application... especially if there is processing that has to occur on every load of the page, whereas the values of your local variables can get out of sync if the user does, since the server side processing does not occur when they do press "Back".

This can produce unexpected results for your users... not error messages, just wierdness.

At any rate, you can put this piece of script on your page to effectively disable the back button on browsers:

history.go(1);
------------------------------------------

and from the ASP classic forum how to force a nocache load of every page:

faq333-1034

-paul
penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Thats the jobby thanx
 
Paul I got a question for you. I am sure you know about the little arrow beside the back button. It allows you to go back more than 1 page in the history. So you go back two pages the little script then moves you forward on right? So now you are 1 page back in the history....... wait a second my brain just kicked in. That page also has the script hack on it so you'll continue to move forward until you reach the front of the que won't you?

My bad just wasn't thinking to hard I guess. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
That's correct. If you put it on every page, then you'll just keep getting kicked through.
penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top