I have came across an issue... whenever I upload new content to the site.. and i send the link to the client.. He can not view the changes instead what he see is the previously updated content. Looks like there is some caching issue.. but i have never seen dynamic content being cached.

Even I have to clear my cache on Safari to view the dynamic changes..

I am using a theme Village . Not sure if that is the theme issue.. Is there any solution to this which i may try rather than waiting for the Theme developer to respond?

I use the following code to make sure that the updated content is loaded everytime the page load.

<?php header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: pre-check=0, post-check=0, max-age=0'); header ('Pragma: no-cache'); ?>

But will it Re-load everything including Js and css files?? If that is the case, then i shouldn't be using this technique?



  • Not gonna post this as answer because it's a long shot, but I've seen something similar related to a host company, don't remember which... – brasofilo May 22 '12 at 8:08
  • Probably 1&1 they seem to hate WP users with a burning passion. – Joshua May 23 '12 at 0:36
  • i use Bluehost... Yes 1&1 hates WP users :D – Nasir Zia May 23 '12 at 4:38

Yeah that's definitely a caching issue. The code you have there should handle it but you can't really guarantee anything.

Do you have a caching plugin installed? If so try disabling that.

Also in your wp-config.php file see if you have this define('WP_CACHE', true); if so change it to false. If it isn't there add it but make that false.

That's really all, in my experience, you can do from our end unfortunately.

  • Thanks Joshua, But will the code which i used will reload everything including CSS nad JS resources??? If that is the case i wont be using it because i dont want a bad user experience by loading all the resources on everypage.... Also there was no define('WP_CACHE', true); so i have added this code with False Value... – Nasir Zia May 22 '12 at 5:52
  • Yeah, from my understanding providing the page respects those calls it essentially tells the server to load the page ignoring any cache and expires any cache that it does have as a backup. So yes, it will force everything to load again upon every page request providing that code is honoured by the browser. – Joshua May 23 '12 at 0:35
  • ok, is there any way to tell the browser to re-load only the dynamic content and do caching process with .js and .css ? may be we should do something with .htaccess ?? – Nasir Zia May 23 '12 at 4:40
  • Not that I am aware of sorry. – Joshua May 23 '12 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.