If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

We are not some sort of public utility standing around here 24/7 just waiting for your questions. Please have a look at forum Guideline #5

5) Do not bump your thread repeatedly when you don't get a response. Sometimes when you post for help, you may not get a response in a timely matter, if at all. Forums aren't wishing wells, and some questions will fall through the cracks. That's a fact of life. It's ok to occasionally bump a thread, but only when done after an ample amount of time (ie: 2-3 days) have passed without a response, and never more than once. Your thread is no more important than another member's when it comes to the amount of attention it should receive.

All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.

If you just want to force the script to download when they first access the page rather than using a cached copy then just add a querystring on the end of the src attribute of the script tag with a value that is always changing (the easiest way is to use server side code to insert the date/time).

To replace a JavaScript with the latest version dynamically at regular intervals while they are still on the page you just need to run the appropriate DOM commands to replace the script tag in the page and add a different value in the querystring so that it forces it to redownload the script rather than usung the cached copy.

for eexample the following will reload script.js from the server every five minutes (you just need to add id="js" to the script tag so it knows which tag to replace)

Users who have thanked felgall for this post:

If you just want to force the script to download when they first access the page rather than using a cached copy then just add a querystring on the end of the src attribute of the script tag with a value that is always changing (the easiest way is to use server side code to insert the date/time).

To replace a JavaScript with the latest version dynamically at regular intervals while they are still on the page you just need to run the appropriate DOM commands to replace the script tag in the page and add a different value in the querystring so that it forces it to redownload the script rather than usung the cached copy.

for eexample the following will reload script.js from the server every five minutes (you just need to add id="js" to the script tag so it knows which tag to replace)