WordPress.org

Ready to get started?Download WordPress

Forums

Quick Cache (Speed Without Compromise)
[Plugin: Quick Cache ( Speed Without Compromise )] Client-side cache/Browser cache (2 posts)

  1. atdblog
    Member
    Posted 1 year ago #

    Hmmm ... don't know where my previous post by this title went. I had asked why Pingdom and Firebug tests say browser caching should be enabled in my site when I saved the browser cache setting in Quick Cache to true (which is not recommended?).

    Anyway, I set it back to false and found a fantastic site with the .htaccess settings I needed to take care of the issue, so I'm sharing. My Pingdom performance score for "Leverage Browser Caching" went from zero to 84 and their result statement "Your website is faster than 48% of all tested websites" went to 58%. Very cool, and it appears even quicker. Here's the code (note: I replaced the site's deflate statements with another set that I preferred from previous use, although its supposed to give the same result):

    # BEGIN Compress text files
    <IfModule mod_deflate.c>
     AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
     AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
     AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
     AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
     AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
     AddOutputFilterByType DEFLATE font/truetype font/opentype
    </IfModule>
    # END Compress text files 
    
    # BEGIN Expire headers
    <ifModule mod_expires.c>
      ExpiresActive On
      ExpiresDefault "access plus 5 seconds"
      ExpiresByType image/x-icon "access plus 2592000 seconds"
      ExpiresByType image/jpeg "access plus 2592000 seconds"
      ExpiresByType image/png "access plus 2592000 seconds"
      ExpiresByType image/gif "access plus 2592000 seconds"
      ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
      ExpiresByType text/css "access plus 604800 seconds"
      ExpiresByType text/javascript "access plus 604800 seconds"
      ExpiresByType application/javascript "access plus 604800 seconds"
      ExpiresByType application/x-javascript "access plus 604800 seconds"
      ExpiresByType text/html "access plus 600 seconds"
      ExpiresByType application/xhtml+xml "access plus 600 seconds"
    </ifModule>
    # END Expire headers 
    
    # BEGIN Cache-Control Headers
    <ifModule mod_headers.c>
      <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
        Header set Cache-Control "public"
      </filesMatch>
      <filesMatch "\.(css)$">
        Header set Cache-Control "public"
      </filesMatch>
      <filesMatch "\.(js)$">
        Header set Cache-Control "private"
      </filesMatch>
      <filesMatch "\.(x?html?|php)$">
        Header set Cache-Control "private, must-revalidate"
      </filesMatch>
    </ifModule>
    # END Cache-Control Headers 
    
    # BEGIN Turn ETags Off
    FileETag None
    # END Turn ETags Off

    BTW: I had previously had an issue with very long initial page loads in Chrome, both on my Win7 and XP machines. After applying the code above, it seems to be fixed. Cleared caches several times in testing but still couldn't recreate the long delays.

    http://wordpress.org/extend/plugins/quick-cache/

  2. Quantum Leap
    Member
    Posted 10 months ago #

    Worked wonders on my sites.
    Thx a lot!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic