I’m trying to be able to add a query to my js file that will change the versions.
For example:
<script type="text/javascript" src="myjavascript.js?v=1.0.0"></script>
I know this is possible because I seen other sites do this.
Thanks for help.
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.
What you’re most likely seeing is a server-side language such as ASP, PHP, etc. “swoop in” and handle the change, then render the contents out as if nothing has happened. Basically, if you can relate to PHP:
The other purpose is, as Nathan mentioned, for avoiding caching issues. But, if you see the script’s contents changing based on this GET variable it’s most likely a server-side language doing so nondescript.