You are here: irt.org | FAQ | JavaScript | Source | Q565 [ previous next ]
I'm not sure if this will work - please let me know - but you might want to try the same trick that is used to reload an image fresh from the server and not from the browsers cache:
<script language="JavaScript"><!-- var now = new Date(); document.write('<script src="library.js?' + now.gettime() + '"><\/script>'); //--></script>
The following was submitted by si
The previous answer doesn't work & after lots of searching I have not found a clean way of doing this.
However, one workaround is to version your .js filenames so 'myscript.js' becomes 'myscript_v1.js'. When you are ready to upload a new release to the server, increment filenames & includes of modified js files. This is now considered a new file & won't be found in the cache. Voila!
Its a bit dirty, I know, but the end result is OK!