WordPress.org

Ready to get started?Download WordPress

Forums

force recache (6 posts)

  1. qwertyjjj
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/search.php?q=add+to+header

  3. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

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

    http://httpd.apache.org/docs/2.2/mod/mod_expires.html

    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"
    </IfModule>

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

  4. qwertyjjj
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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

Tags

No tags yet.