I have had this problem also. I think this is because
files aren't treated as regular web pages by IE. I have found that even if you include the NOCACHE header, when serving .js files, IE happily ignores this.
Your best bet, if you really need to be sure your JS code is fresh, is to use server-side includes, or some other dynamic server-side method of including the script directly in the HTML page. This accomplishes the same goal as the external script source (one script included in many pages), but is handled by the server, rather than the browser.
Another trick you might try, though is to add a fake URL query string to your javascript source attribute. This would make it
seem as if the browser is requesting a different file every time the query string changes, but in fact would not affect the download of the actual file at all:
Code:
<script src="myjsfile.js?fakevariable=randomtext">
Actually, this method of calling Javascript can be even more useful if you are using a server-side scripting language like PHP or ASP, because your external JS file can just as easily be a PHP-outputted page:
Code:
<script src="myjsfile.php?realvariable=value">
This allows your HTML page to request a certain external Javascript page with certain query string variables, which can be used in the output to dynamically affect what gets loaded. -------------------------------------------
Big Brother: "War is Peace" -- Big Business: "Suspicion is Trust"
(