Problem with caching, W3TC

Am using W3TC from a long time but from past few weeks am stuck, as I can’t see my edits working. It was all fine in past but from a week my edits in style.css reflects back in like an hour after.

http://i.imgur.com/f3LwQ.png

Read More

http://i.imgur.com/rzydS.png

http://i.imgur.com/bMffA.png

http://i.imgur.com/XWniN.png

http://i.imgur.com/6cpnf.png

http://i.imgur.com/pBN0X.png

http://i.imgur.com/ZrJsP.png

http://i.imgur.com/4RaSj.png

http://i.imgur.com/B6w3o.png

Related posts

Leave a Reply

1 comment

  1. The best way I can think of is to add a unique string to the end of the stylesheet include to get everything to update.

    For example, if you are including it in the header.php file:

    <link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?><?php echo '?v='. time(); ?>" />
    

    Of course that will keep it from being cached… ever. So you might want to turn it off and on. You could add a variable to activate it or you could tie it to wp_debug:

    <link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?><?php if ( defined('WP_DEBUG') && ! WP_DEBUG ) echo '?v='. time(); ?>" />
    

    Or just comment it out when you are done:

    <link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?><?php #echo '?v='. time(); ?>" />
    

    You can use all of those if you are enqueueing the styles as well.