I'm using Jquery UI (jquery-ui-1.8.13.) in asp.net mvc 3 application.
In local (IIS express), it always loads http://localhost:19992/content/redmont/images/ui-icons_f9bd01_256x240.png, for every page. Its slow. I guess static caching is not working in IIS express. Web.config which I h开发者_StackOverflowave defined in Content folder:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseExpires" httpExpires="Sun, 01 Dec 2019 00:00:00 GMT" cacheControlCustom="" />
</staticContent>
</system.webServer>
</configuration>
but to no avail.
When you run a site on IIS Express under local host, all caching is disabled. This is a good thing, because you are most likely still building/debugging the site. Caching static content such as javascrip and css can be very confusing at that stage.
When you finish building the site, you can upload it to IIS, and the static caching should work just fine.
Since you are interested in performance, you may use some other helpful web.config settings, but they will also not work with localhost.
精彩评论