PDA

Click to See Complete Forum and Search --> : Force re-load *RESOLVED*


Fishcake
Nov 10th, 2003, 05:28 AM
I have a page that i only want accessable if the user has come from a certain page. The logic for this is all good and well but the problem occurs if the user hits the back button in their browser, the page is displayed again but the sub page_load doesn't fire.

How can i force the page to reload?

I've tried messing around with various methods so far with no luck, any idea's?

Lethal
Nov 10th, 2003, 08:04 AM
Haven't tested this, but give it at go:


// Add the no-cache header to the response so stale pages are not served up
Response.AddHeader("Cache-control", "private, no-cache, must-revalidate");
Response.AddHeader("Expires", "Mon, 7 Jul 1980 05:00:00 GMT");
Response.AddHeader("Pragma", "no-cache");

Fishcake
Nov 12th, 2003, 03:46 AM
Cheers Lethal thats almost done the trick.

If a user tries to go back to the page they get a "Warning: Page has Expired" page but they are still able to hit refresh and resend the information.

There must be a way to stop the Browser being able to just re-send information, isn't there?

Fishcake
Nov 12th, 2003, 07:58 AM
Got it sorted now, cheers.