0

I 'm trying to grasp the concept of versioning css/js files.

www.prelovac.com/vladimir/adding-version-to-theme-css-file


<link rel="stylesheet" href="/css/base.css?version=1234" type="text/css" />

This method will actually prevent the file from being cached, period! This is bad.

source


What is the best practice of doing this in Wordpress? I'm confused...

2 Answers 2

3

There is a plugin up on the WordPress Plugin Repository now that handles versioning of stylesheets and scripts automatically. You can find it at: http://wordpress.org/extend/plugins/versions/

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

Comments

2

That's not how it works in my experience. Browsers do cache based on GETs. To test this, go to the author's url (http://static.prelovac.com/style.css?1266235697) with firebug enabled. First request should give you "200 OK", now refresh and you get "304 Not Modified".

If you're not convinced, you can always try this method

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.