I have seen code like this:
<script type="text/javascript" src="js/my_js.js?id=<?php echo time(); ?>"></script>
I do not understand the reason for the id, nor how to use the id in the .js file, if this is possible.
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.
It is to force the browser to refresh the JavaScript file, otherwise the browser may display a cached version at a later date.
You can also do this to CSS files.