1

What is the best practise in terms of JavaScript and CSS versioning?

If we don't version then the browser could have a older cached version is z_1.0.js

Using version control will solve this issue but I don't see it used a lot on other websites?

IanWatson
  • 1,649
  • 2
  • 27
  • 49

1 Answers1

0

You can add a version number in a parameter:

<link rel="stylesheet" href="style.css?version=20150620">

The file itself can just be named style.css, but if you change the version number in your html file, it the browser will load the new version. You can just use the date or whatever for the version number.

Okku
  • 7,468
  • 4
  • 30
  • 43