0

I am modifying a WordPress site's appearance (minor modifications) but can't see the result on chrome because of annoying persistent cache. I tried shift+refresh but it doesn't work. how can i disable the cache temporarily or refresh the page in some way that I could see the changes?

thanks.

  • 1
    See this http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development – LTasty Aug 09 '15 at 00:15

2 Answers2

2

You should not modify your code to achieve this. If you are using Google Chrome as you said you should press Ctrl+Shift+j and go to Network tab. Check the Disable cache option and reload the page. Browser will display the response from the server (not from cache).

izupet
  • 1,371
  • 4
  • 18
  • 40
0

You can delete the browser cache by adding these headers in your header.php file :

<?php
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>

Hope this will help you.

Regrads