Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
//----- Second Technique : To Stop Caching of Secure Pages.
if (Session["UserName"] == null)

Recommended Answers

What's the problem?

Jump to Post

All 3 Replies

What's the problem?

Please provide addtinional information regarding your quetsion so that we can advise...

I think the OP is just showing two ways to clear a session and cache to prevent a user hitting the back button after logging out of a site.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.