force recache

  • How can I add this to all my pages to force a browser recache within wordpress?

    <meta http-equiv=”Cache-Control” content=”no-cache”>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Jan Dembowski


    It’s not really the best way to do it but you can add that via a header plugin.


    This can be done also in your (root) .htaccess file with the mod_expires.c module.


    In the example below, the file types listed are set to expire in the local cache in 60 days by adding the expires header date to the file. Adjust as desired, but making them very short or 0 will impact server performance, increase page load times to returning visitors etc.

    <IfModule mod_expires.c>
        ExpiresActive on
        ExpiresByType text/css "access plus 60 days"
        ExpiresByType text/javascript "access plus 60 days"
        ExpiresByType image/ico "access plus 60 days"
        ExpiresByType image/jpg "access plus 60 days"
        ExpiresByType image/jpeg "access plus 60 days"
        ExpiresByType image/gif "access plus 60 days"
        ExpiresByType image/png "access plus 60 days"
        ExpiresByType text/css "access plus 60 days"
        ExpiresByType text/html "access plus 60 days"

    Also, browser cache can be cleared with browser settings, so it may depend on what browser is used and how.

    will that header plugin mess with any seo plugins?

    Moderator Jan Dembowski


    Nope. Although what “Seacoast Web Design” proposed really is a better solution.

    If I want to force the cache because it is a new site then I have no other option apart from 0?
    Many browsers will have cached the old redirect?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘force recache’ is closed to new replies.