0
我的網站上使用母版(asp.net web表單),我喜歡woluld實現一些靜態文件緩存,如JavaScript,CSS等如何實現的靜態文件緩存在asp.net
我已經嘗試將以下內容添加到我的page_load(在masterpage中),但是當我使用Fiddler時,靜態文件仍在「no-cache」之下。
protected void Page_Load(object sender, EventArgs e)
{
// Set cache for 1 hour on all computers and servers.
// ... Proxies, browsers, and your server will cache it.
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.SetMaxAge(new TimeSpan(1, 0, 0));
}
我在做什麼錯在這裏?除非要求這樣做
// Nicke