Page Expiration

N

Nitin

When the user logs out from my user page I don't want him to be able to come
bak to that page by pressing the 'Back' button of the browser.

i use this code in the page_load event
'
Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")
'
It doesn't seem to work. Please suggest.
Regards,
Nitin
 
G

Guest

Hi Nitin,

If the system time on the client is earlier than the system time on the
server (because of either the client or server having an inaccurate time
setting, or time-zone differences), setting the parameter to 0 does not have
the effect of expiring the page immediately. You can use the
Response.ExpiresAbsolute property to immediately expire a page. In addition,
you can use a negative number for the Expires property to expire the response
immediately.

Response.Expires = -1

Cheers,

Jerome. M
 
P

Patrick Olurotimi Ige

Nitin,
U can't actually disable the BACK button.
But u can use the javascript below to do the trick
javascript:window.history.forward(1);
Hope it helps
Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top