asp.net-mvc: javascript caching
- by Omu
I'm thinking whether it makes sense in order to increase the speed of the website to do some strategy of caching the js files that are being included ?
one idea that I have is to do something like this:
[OutputCache(Location = OutputCacheLocation.Any, Duration = 3600)]
public JsController : Controller
public ActionResult JQuery()
{
//I would have a ascx with the entire jquery script inside
return View();
}
and on the site.master:
<%=Html.RenderAction("JQuery","JsController");