How about setting the Headers inside the Application_PreSendRequestHeaders
event in Global.asax?
EDIT
You can use Response.Cache.SetCacheability
rather than setting the Headers directly.*
void Application_PreSendRequestHeaders(Object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
Tested in Fiddler.
Alternative way by setting the Headers manually.
void Application_PreSendRequestHeaders(Object sender, EventArgs e) {
Response.Headers.Set("Cache-Control", "no-cache");
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…