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.
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.
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.