Results 1 to 1 of 1
Like Tree1Likes
  • 1 Post By maimento

Thread: Cache, best practice ?

  1. #1
    Thread Starter
    Expired Customer maimento's Avatar
    Join Date
    Nov 2014
    Location
    Denmark
    Posts
    102
    Thanks
    4
    Thanked 3 Times in 3 Posts

    Cache, best practice ?

    Hello

    I've been testing different cache settings and what to share my experience. They might be useful - and there might be some of you that have different experiences, pls share.

    First of all it seems to me that most cache plugins creates unintended problems and in some cases even slow down page-loading. Secondly it is my experience that good results (like 10+ in Google page speed test) can be achieved by a rather basic approach: Add the following at the top of the .htaccess file, it should be self-explaining (the first element, mod_deflate, is hosting server dependent so it might not work if the module is not running/activated).



    # DEFLATE JAVA etc
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
    </IfModule>

    # END DEFLATE JAVA etc

    # Cache 2 weeks for most static content
    <filesMatch ".(jpg|jpeg|png|gif|ico)$">
    Header set Cache-Control "max-age=1209600, public"
    </filesMatch>

    # Cache 1 week for css js
    <filesMatch ".(css|js)$">
    Header set Cache-Control "max-age=604800, private"
    </filesMatch>

    # Cache 2 min html htm xml php
    <filesMatch ".(html|htm|xml|php)$">
    Header set Cache-Control "max-age=120, private, must-revalidate"
    </filesMatch>

    # END Cache
    talent likes this.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: April 11th, 2017, 09:21 PM
  2. Upgrade to another plan hack? Best practice
    By wzshop in forum Help Using Vantage (Legacy)
    Replies: 0
    Last Post: June 23rd, 2015, 07:38 AM
  3. [SOLVED] Update apptheme plugin best practice ?
    By zenb231 in forum Help Using Vantage (Legacy)
    Replies: 1
    Last Post: April 5th, 2015, 12:38 PM
  4. W3 Total Cache or WP Super cache on Multisite?
    By dipolog in forum WordPress General Discussion
    Replies: 1
    Last Post: October 9th, 2013, 03:11 AM
  5. Replies: 1
    Last Post: October 27th, 2011, 06:30 AM