force recache (6 posts)

  1. qwertyjjj
    Posted 3 years ago #

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

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

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


  3. Pioneer Web Design
    Posted 3 years ago #

    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.

  4. qwertyjjj
    Posted 3 years ago #

    will that header plugin mess with any seo plugins?

  5. Nope. Although what "Seacoast Web Design" proposed really is a better solution.

  6. qwertyjjj
    Posted 3 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.