1

I've noticed some sites when they link to their css they pass what appears to be a GET variable in addition to the link, for example the http://html5boilerplate.com html template, ?v=2

<link rel="stylesheet" href="css/style.css?v=2">

Is this a flag for some server rewrite or something more?

3 Answers 3

5

Some sites may use it to route to specific css files, However, Without knowing the specific site you are referring to:

In the event that the css file changes, it provides a easy way to reset the browser cache on the clients computers. changing the v=2 to v=3.

Sign up to request clarification or add additional context in comments.

Comments

4

This technique is used to load newly updated css files to users computer to replace the older one in cache. By simply changing the number from 2 to x, the browser will force loading the new css file. if this technique was not used, the user will have to clear his cache in order for the latest css file to take effect.

Comments

3

It is a GET parameter. The css file might be generated by php which may take this parameter into account and yes, it may also be used by other server side techniques to deliver a file from a different path.

The Scrum Meister's response is of course true as well ;-).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.