updated   : April 22, 2013
we now have 608 snippets

Prevent cached CSS

wordpress snippet

These are two example to control the caching of CSS for your wordpress theme. The first example appends time() to the end of the file name. The second method simply type ?v=1.0 and change the version number when you update your CSS.

snippet :  PHPcopy
	<style type="text/css" media="screen">
		@import url( <?php bloginfo('stylesheet_url'); ?>?<?php echo time(); ?> );
	</style>
snippet :  PHPcopy
	<style type="text/css" media="screen">
		@import url( <?php bloginfo('stylesheet_url'); ?>?v=1.0 );
	</style>