Friday, September 19, 2014

how to enable cache in browser?


 var cache = Response.Cache;
    cache.SetCacheability(HttpCacheability.NoCache);
    cache.SetRevalidation(HttpCacheRevalidation.ProxyCaches);
    cache.SetExpires(DateTime.Now.AddYears(-5));
    cache.AppendCacheExtension("private");
    cache.AppendCacheExtension("no-cache=Set-Cookie");
    cache.SetProxyMaxAge(TimeSpan.Zero);

Compatibility view setting in meta tag


This tag should be inside head section in html plge

meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7"