user2119340
user2119340

Reputation:

Force browser to load last angularjs app code

I have a web application in production environment because of cache clients does not always have the newest version of our code

How can I solve this problem please ?

Upvotes: 2

Views: 883

Answers (1)

LD Robillard
LD Robillard

Reputation: 434

Just add a version param to the url of your scripts:

<script type="text/javascript" src="my-script.js?v=1.0.1"></script>

This way, you can control manually wich one of your script needs to be reloaded. You shouldn't have to change anything to your file name.

Upvotes: 1

Related Questions