? ver = at the end of include - is there a technical effect?

I wonder what exactly the version name does?

how is jquery.js? ver = 1.4.4

I mean, if I use cdn like this jquery / 1.4.4 / jquery.min.js? Ver = 1.4.4, but the other side has jquery / 1.4.4 / jquery.min.js? Ver = 1.3.2, does this affect caching?

+3
source share
1 answer

Yes, changing =1.4.4to something else, it causes the file not to be cached by the browser when the user returns to the page. Therefore, if you upgraded to a new version of jQuery, say 1.4.5, and you wanted to make sure that the client received the latest version of the file, you will change the end of the URL. This makes the browser think that it is a completely new file and forces it to download a new version.

(Having a version at the end will help you easily determine which version of the file you have, but this is completely away from what is being set :)).

+7
source

Source: https://habr.com/ru/post/1780958/


All Articles