J'utilise un Masterpage (Les WebForms asp.net) sur mon site et je woluld aime à mettre en œuvre la mise en cache de certains fichiers statiques, comme javascript, css, etc.Comment mettre en œuvre la mise en cache des fichiers statiques dans asp.net
I J'ai essayé d'ajouter ce qui suit à mon page_load (dans la page master) mais quand j'utilise Fiddler les fichiers statiques sont toujours sous "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));
}
Qu'est-ce que je fais de mal ici?
// NICKE