How are the version files in the <HEAD> section?

I have seen on various sites how developers can update their css / javascripts files by setting querystrings similar to:

<head>
    <link rel="stylesheet" href="css/style.css?v=1">
    <script src="js/helper.js?v=1">
</head>

How it's done? Is this a good practice? I searched around, but apparently I'm not looking for the right conditions. If that matters, I'm using ASP.NET.

Edit:: I noticed (via Firebug) that if I "version" my files (? V = 1), they will always load and will always redefine the cache. Is there any way around this?

Thanks in advance.

+5
source share
3 answers

. , ( ), , html , . , .

+4

, , , . . , . , , , , . , .

+2

, . , . , , .

I do not know how to do this automatically in ASP.NET, Ruby on Rails, for example, checks the last modified timestamp on a file and adds it as the version number to the file. I am sure you can do something similar in ASP.NET.

+1
source

All Articles