react-social-login

The easiest way to integrate Social Login in your React Apps ...Checkout NPM

Thursday, June 16, 2011

disabling Page Cache

1. Create a new .cs file "MyHttpModule.cs"

    public class MyHttpModuleIHttpModule
    {
 
        public void Dispose()
        {
            
        }
 
        public void Init(HttpApplication context)
        {
           context.PostRequestHandlerExecute +=new EventHandler(context_PostRequestHandlerExecute);
        }
 
        public void context_PostRequestHandlerExecute(object sender, EventArgs e)
        {
            HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
        }
    }
}


2. Register this module in web.config


 <httpModules>
          <add name="sessionmodule" type="WebApplication1.sessionmodule"/>
      httpModules>
  system.web>

Your all requests will automatically be skipped from caching.

No comments :

Post a Comment

What are your thoughts on this post? Did you like it?