HTTP MODULE Event Does Not Fire When Click Browser's Back Button

Posted by Ali on Stack Overflow See other posts from Stack Overflow or by Ali
Published on 2010-05-30T08:04:06Z Indexed on 2010/05/30 8:12 UTC
Read the original article Hit count: 367

Filed under:
|
|
|
|

I Wrote an Http Module that checks if logged user is restricted disables images on the page.

void application_AuthorizeRequest(object sender, EventArgs e)
{
.
.
.

 if (context.User.IsInRole("Restricted"))
       {
           context.Response.StatusCode = 401;
           context.Response.End();
       }

The code works fine. When the page loads, every image on the screen disapears. but when I go to another page and click back button on the browser and goto previous page images appear. What should I?

(I dont want to clear Cache every time)

context.Response.Cache.SetNoStore();
context.Response.Cache.SetCacheability(HttpCacheability.NoCache);

© Stack Overflow or respective owner

Related posts about cache

Related posts about button