Andy said:
If you just want to refresh the js during development and test, control-f5
seems to work in IE
If you want it never to be cached in the production environment, you'll need
to get the web server to generate a no-cache HTTP directive. you'll need to
refer to the documentation for your web server on that one.
Andy
One of the ways to deal with this is something like:
<script type="text/javascript" src="my.js?version=200308070934"></script>
When you change my.js, change the HTML containing the reference to it and upload
them both. This can be bothersome if you use the script in many HTML files,
there are two other options to this:
1) server-side includes: put the <script ...> tag in another file and use SSI to
include that file on each page you want the script to appear on. Then you change
the "version" value above in a single place and it will take effect on all pages
2) client-side "includes": put
document.write('<script type="text/javascript"
src="my.js?version=200308070934"><\/script>');
in /another/ script file ("myWrapper.js" or something), then include that one on
your pages. If you never want your file cached you could use:
document.write('<script type="text/javascript" src="my.js?timestamp=' +
(new Date()).getTime() +
'"><\/script>');
--
| Grant Wagner <
[email protected]>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp
* Netscape 6/7 DOM Reference available at:
*
http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
*
http://www.mozilla.org/docs/web-developer/upgrade_2.html