Asp.net ile Cache pasif yapmak
3 Ekim 2019 / 20:58
Burak
Merhaba arkadaşlar,
Asp.net cache olayını kimi zaman pasif hale getirmek isteyebiliriz.İşte böyle durumlar sayfamızın page_load eventına aşağıdaki kodu yazmanız yeterlidir.
1 2 3 4 5 |
HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false); HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache); HttpContext.Current.Response.Cache.SetNoStore(); Response.Cache.SetExpires(DateTime.Now); Response.Cache.SetValidUntilExpires(true); |
Bu Yazılarıda Okuyabilirsiniz...
Bir cevap yazın