Why we need to Force CSS changes to “go live” immediately? As Web / WordPress designer we are even found some terrible problem. The problem is about internet / proxy cache in our system or ISP (Internet Services Provider) this is terrible bad news, if we develop/designed this site in live server.
One way to solve this is to “version” your CSS file, by adding ?v=123 to the URL in the
to your stylesheet. This is rather a pain to have to do by hand every time, so here is a much better way
That’s what Mark Jaquith said on their blog, so to avoid and Force CSS changes we need to put some code in our style.css, so he we go to do this
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?' . filemtime( get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen, projection" />
The Second Tricks, is using add_filter method. Just write down this code below on your theme functions.php
add_filter('stylesheet_uri', create_function('$s', 'return $s . "?" . filemtime( get_stylesheet_directory() . "style.css"");'));
So simple right? this simple code added giant impact for cache system, so the proxy cache or whatever it said, will always updated the style.css we the version has been changed.
So what does the filemtime function do? From the PHP website:
This function returns the time when the data blocks of a file were being written to, that is, the time when the content of the file was changed.
We hope today WP Tricks about To Force CSS changes to “go live” immediately useful for you. You can use CSS Cache Buster too to avoid this problem
Photos by Lisa Carpenter (001) 212 962 0060




There was a time when i used to have many problems with caching, but letely i didn’t experienced so many problems.
A good browser and a good DNS can solve it.
I’m using Chrome and Firefox as browser and i’ve set my DNS to use Google DNS which is: 8.8.8.8 and alternative 8.8.8.4
You second Google DNS is wrong, I think the correct IP is 8.8.4.4