Why pass parameters to CSS and JavaScript link files like src=”../cnt.js?ver=4.0″?

It is usually done to prevent caching.

Let’s say you deploy version 2 of your new application and you want to cause the clients to refresh their CSS, you could add this extra parameter to indicate that it should re-request it from the server. Of course there are other approaches as well, but this is pretty simple.

Leave a Comment