Disabling cache for stylesheets
What is “Cache“? Your browser (Firefox, Chrome, Internet Explorer, etc.—whatever application you use to surf the web) has a folder in which certain items that have been downloaded are stored for future access. Graphic images (such as buttons, banners, icons, advertising, graphs, and color bars), photographs, and even entire web pages are examples of cache items. When going to a page on a website, your computer will check its cache folder first to see if it already has those images and, if so, it won’t take the time to download them again. This makes for a faster loading of the page. Cache folders can get quite large, however, and can occupy 40-to-50-to-100 megabytes or more of hard drive space, storing graphics for sites you may never visit again, so it may be wise for those with storage concerns to empty the cache periodically. That will also enable the browser to access updated web pages without the older cache item interfering. You can also limit how much cache is stored.
To disable caching in wordpress insert the following code in the <head> section of your theme:
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); echo '?'.filemtime( get_stylesheet_directory().'/style.css'); ?>" type="text/css" media="screen, projection" />
The above line will insert append a number (Posix time) to the query string of the URL containing the time when file was last modified. This way your stylesheet file will always be up-to-date according to the file system.







Thanks man i was looking for this!