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