Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How can any page on the site be forced to refresh or load content by ignoring anything in cache, everytime a visitor visits the page for the second time? The website uses twentyeleven & w3tc (browser caching disabled at the moment).

share|improve this question

closed as off-topic by G. M., birgire, EAMann Aug 22 at 17:06

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

    
Ultimately, you probably can't but why would you want to try in the first place? –  s_ha_dum Sep 3 '13 at 1:31
    
I want the members of the website to be able to see any changes that have been made to their 'profile' instantly. So for example, new member was added under category - somecategory after a payment on the phone, since the member has already visited the page, he can not see himself added on this page. So everytime he has to be told to hit F5. This is a stupid (and perhaps not ideal) situation but I have been trying to find a workaround for the past 2 days. I would like to emphasize that it is not a case of ideal implementation of theme but a case where the only question is - Can it be achieved? –  vDog Sep 3 '13 at 1:48
    
Does this help? wordpress.stackexchange.com/q/7112/21376 –  s_ha_dum Sep 3 '13 at 2:29

1 Answer 1

up vote 2 down vote accepted

Since, your site already uses W3 Total Cache plugin, let me provide a solution based on it.

Please visit yoursite's wp-admin/admin.php?page=w3tc_browsercache and look for the text "Set cache control header". Check this option, if it is unchecked, and then choose "no-cache" for the "Cache control policy". This needs to be done in three places...

  1. CSS & JS
  2. HTML & XML
  3. Media & Other files

enter image description here

If you do not wish to use W3 Total Cache plugin for some reason, you may set the following in 'htaccess' file or in Apache configuration, assuming your server has mod_headers module...

Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
share|improve this answer

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