homepage Welcome to WebmasterWorld Guest from 54.196.194.204
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
GZip enabled but not working?
DigitalSky




msg:4559449
 5:14 am on Mar 29, 2013 (gmt 0)

I'm running a dedicated server and I have double checked to ensure that mod_deflate is enabled via Apache (which it is).

I've also gone in under cPanel > Site Optimization, and turned on compression.

The site is running WordPress with the W3 Total Cache Plugin and the GZip options enabled. Sure enough when I check the page response headers in Google Chrome's PageSpeed plugin there is no 'Content-Encoding: gzip' header. I've also ran the site though the GZip checker but it says compression is not enabled anyways.

I am not sure what's causing the compression not to work. It's enabled on the server which I have verified through my Linux System Administrators at Host. Any ideas?

[edited by: Ocean10000 at 5:30 am (utc) on Mar 29, 2013]
[edit reason] Removed links [/edit]

 

phranque




msg:4559562
 1:02 pm on Mar 29, 2013 (gmt 0)

have you set any output filters?

please post all the mod_deflate and compression-related mod_header directives from your .htaccess file.

DigitalSky




msg:4559641
 6:35 pm on Mar 29, 2013 (gmt 0)

Oops, here is the content of my .htaccess file...


<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
</IfModule>
</IfModule>

lucy24




msg:4559673
 9:01 pm on Mar 29, 2013 (gmt 0)

Before anything else: Dump ALL the "IfModule..." envelopes. Not their content, just the envelopes themselves. Those are boilerplate that comes with mass distributions. You are now on an individual server that either has or does not have the required modules.

Once you've dumped the envelopes you will have a clearer idea of what your overall structure is.

Besides, nesting "If" statements makes me nervous. The more complicated you get, the more room there is for unintended consequences. (See unrelated thread elsewhere about surprising discoveries involving the humble FilesMatch.)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved