I always see this: <link ... href="style.css?v=1"
What is that ?v=1? How does this work? Can someone explain what this does and why I should it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CSS doesn’t accept query string parameters. The v=1 usually indicates the version number of the CSS file, that way it will force the browser to pull the updated file rather than using one in the cache.
The browser will get a new copy whenever it sees that the href attribute has changed. If it stays at
v=1then it won’t get a new copy. You should consider doing it this way if your CSS changes regularly.