User see the current version of Jquery and CSS without cache [duplicate]

Posted on

Question :

Whenever I update the CSS and JQUERY of a site, I need to be asking the client to open the site in an anonymous window. Because his browser saves the old files and he can not see the changes.

How best to get around this?


Answer :

I’ll summarize all possible ways and give you a hint, use a random number at the end of import.
I use a java application and I’ll leave an example:

<script type='text/javascript' src='${homePath}/script/jQuery/jquery-ui.js?v=${random.nextInt()}'></script>


Leave a Reply

Your email address will not be published. Required fields are marked *