Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable gzip compression? #277

Closed
343max opened this issue Jan 5, 2014 · 8 comments
Closed

How to disable gzip compression? #277

343max opened this issue Jan 5, 2014 · 8 comments

Comments

@343max
Copy link

343max commented Jan 5, 2014

How can I disable gzip compression manually? I have the suspicion pod loves gzip compression is not working that well with W3 Total Cache.

@eteubert
Copy link
Member

eteubert commented Jan 5, 2014

At the moment it is not possible. I just (b6c286e) added a filter to disable it which will be available in the next release:

// add this snippet somewhere to disable gzip
add_filter('podlove_enable_gzip_for_feeds', function() { return false; });

The alternative is to exclude feeds from W3TC caching.
If you stumble upon more details, I'd love to hear about them. Being compatible to all caching plugins out there is not too easy ;)

@343max
Copy link
Author

343max commented Jan 7, 2014

Great, can't wait for the next release. :)

I can't disable only feeds in W3TC, I can only disable pages. And caching pages (and especially feeds) was the whole reason why I installed it in the first place. :)

@funkenstrahlen
Copy link

I think I am running in a similar problem when I activate Zencache:

https://sendegate.de/t/probleme-mit-zencache/1514/4

Feedvalidator says Not a gzipped file (Server response declares Content-Encoding: gzip; misconfigured server?)

This error also occurs when I disable rss feed caching in Zencache.

@eteubert
Copy link
Member

Does applying the same correction also fix it?

@funkenstrahlen
Copy link

I added the line to wp-settings.php. After clearing Zencache the feed validates now via feedvalidator. It also is served from the cache as expected.

However there is one problem left. The output is no longer gzip compressed. Nor the main page or the feed are compressed. Despite I enabled it in .htaccess

# Enable gzip compression
<IfModule deflate_module>
    <IfModule filter_module>
        AddOutputFilterByType DEFLATE text/plain text/html
        AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
        AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
        AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
        AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf
        AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttf
    </IfModule>
</IfModule>

Do you know why?

@funkenstrahlen
Copy link

Fixed it. I did not enable gzip compression correctly on uberspace. Now it seems to work. Thank you.

@funkenstrahlen
Copy link

Why do you even do gzip in podlove? shouldn't you leave this to the webserver?

I think the following happens:

  • Podlove servers a gzipped feed
  • With caching enabled the gzip file gets cached
  • if the server does not have gzip enabled it does not serve a gzip header, but because of the caching plugin the server serves the gzip compressed file.
  • this irritates some clients

Do you think that's true? A lot of users do not seem to have problems with Zencache though. Maybe because their server has gzip compression already enabled? So I only ran into the issue because I had it disabled? I am still a little unsure...

@eteubert
Copy link
Member

Why do you even do gzip in podlove? shouldn't you leave this to the webserver?

Because the size/performance of feeds/feed requests is crucial to server performance. I don't expect users to fiddle with htaccess rules to enable a fundamental feature (their server not going down once an episode is released).

If some software caches a site and then delivers it with the wrong headers (like caching a gzipped site and then delivering it with html or plain text headers) I consider this a bug in the caching layer. But I'm not sure what exactly the issue in your stack was.

We do check if the server is actually able to do gzip compression and if the client accepts it. But if the zlib-module is available to PHP but not to your web server, there might be issues. I don't think we can check for those edge cases though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants