How do I ensure that the user has the latest .js file cached in his browser? I’d like to have the app force the browser to a complete reload of all files on every session start.
Let me know how this can be done.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Typically you would use an extra cache buster parameter on your < script > tag:
Then every time you make a change to my-script.js, you can increase the version number:
And so on.. now when the user comes back, their browser will be forced to download the updated javascript.