• Hi. In chrome dev tools, Network tab, when I click on file it shows headers and info about GZIP. So I can see that some files are GZIP compressed, but some not! All files that were not compressed are JavaScript files. Eventhough some other JS files were compressed.
    For example this file was not compressed: /themes/deck/js/jquery.flexslider-min.js.

    My .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    AddOutputFilterByType DEFLATE text/plain 
    AddOutputFilterByType DEFLATE text/html 
    AddOutputFilterByType DEFLATE text/xml 
    AddOutputFilterByType DEFLATE text/css 
    AddOutputFilterByType DEFLATE application/xml 
    AddOutputFilterByType DEFLATE application/xhtml+xml 
    AddOutputFilterByType DEFLATE application/rss+xml 
    AddOutputFilterByType DEFLATE application/javascript 
    AddOutputFilterByType DEFLATE application/x-javascript 
    # END WordPress

    How do I fix this?
    Thanks.

    • This topic was modified 7 years, 9 months ago by Expert1.
Viewing 4 replies - 1 through 4 (of 4 total)
  • try that code

    <IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </IfModule>
    Thread Starter Expert1

    (@expert1)

    Still does not work.

    Thread Starter Expert1

    (@expert1)

    Seriously try it with any of your theme. So I assume it’s a WP bug.

    Thread Starter Expert1

    (@expert1)

    Please give advice. I don’t know where to go. Stackoverflow didn’t like my question too.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘GZIP does not work for some files.’ is closed to new replies.