There are a lot of questions concerning how NOT to cache, but no questions on how to cache JavaScript in IE(8).
I tried all 4 options under Browsing History -> Settings, but on each request the same thing happens:
IE successfully downloads the newest version of the .js file. I've checked the log at C:\inetpub\logs\LogFiles\
and on every request I make, I can see that jsFile.js is requested:
2013-11-28 13:55:29 10.120.59.9 GET /developmentMachine1/js/jsFile.js - 80 - 10.241.247.58 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/5.0;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C;+.NET4.0E;+InfoPath.3;+BRI/2) 304 0 0 62
How can I cache that file?
Edit: I'm using ASP to generate the page.
Edit 2: I solved this by adding the web.config
file with the following contents in the js folder of my app.
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-control" value="private" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>