• Hi, my site is still loading slowly even with the Falcon activated. I wanted to add this code to the htaccess file but want to make sure it’s correct. Is it okay to add the cache below? Thank you!

    # Compress HTML, CSS, JavaScript, Text, XML and fonts
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
    AddOutputFilterByType DEFLATE application/x-font
    AddOutputFilterByType DEFLATE application/x-font-opentype
    AddOutputFilterByType DEFLATE application/x-font-otf
    AddOutputFilterByType DEFLATE application/x-font-truetype
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE font/opentype
    AddOutputFilterByType DEFLATE font/otf
    AddOutputFilterByType DEFLATE font/ttf
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml

    # Remove browser bugs (only needed for really old browsers)
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    Header append Vary User-Agent
    PLUS THIS:
    ## EXPIRES CACHING ##

    ExpiresActive On
    ExpiresByType image/jpg “access 1 year”
    ExpiresByType image/jpeg “access 1 year”
    ExpiresByType image/gif “access 1 year”
    ExpiresByType image/png “access 1 year”
    ExpiresByType text/css “access 1 month”
    ExpiresByType text/html “access 1 month”
    ExpiresByType application/pdf “access 1 month”
    ExpiresByType text/x-javascript “access 1 month”
    ExpiresByType application/x-shockwave-flash “access 1 month”
    ExpiresByType image/x-icon “access 1 year”
    ExpiresDefault “access 1 month”

    ## EXPIRES CACHING ##

    https://www.ads-software.com/plugins/wordfence/

Viewing 1 replies (of 1 total)
  • Plugin Author WFMattR

    (@wfmattr)

    I’m not a browser caching expert, but I think most of this will work ok.

    I would remove the line to DEFLATE text/html, as Falcon saves pre-compressed copies to server (that line might cause the content to be compressed twice, which will make the page load incorrectly.)

    I would also remove “ExpiresByType text/html …” and the ExpiresDefault at the bottom — or just make the text/html expiry very short. (Otherwise, people who visit your site might not see new posts for a month.)

    Often when a site is slow even after enabling caching, it can be caused by another plugin that is preventing pages from being cached. If you try disabling other plugins temporarily, you can see if disabling one of them causes a significant speed increase. (Make sure to test in a separate browser where you are not logged into the site — if you are logged in or logged out but did not completely exit your browser, you will not see cached pages.)

    -Matt R

Viewing 1 replies (of 1 total)
  • The topic ‘Is this the correct Gzip code for htaccess using Wordfence?’ is closed to new replies.