Questions tagged [mod-deflate]

The mod_deflate is an Apache web server module that provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network.

The mod_deflate is an Apache web server module that provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network.

Simplest configuration is made by putting the following line in the .htaccess file:

AddOutputFilterByType DEFLATE text/html text/plain text/xml

The following configuration, while resulting in more compressed content, is also much more complicated. Do not use this unless you fully understand all the configuration details. Compress everything except images:

<Location />
    # Insert filter
    SetOutputFilter DEFLATE

    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
</Location>
166 questions
0
votes
1 answer

Error "AH01385: Zlib error -2 flushing zlib output buffer" using Embperl, mod_deflate, and Apache 2.4

We're trying to migrate a web application from Apache 2.2 (on Ubuntu 12.04) to Apache 2.4 (on Ubuntu 14.04). On 2.2, our application behaves fine. On 2.4, we get an error in the log on every request, which looks like this: ... [deflate:error] ...…
jon without an h
  • 572
  • 1
  • 4
  • 17
0
votes
3 answers

mod_deflate with IBM WebSphere and IBM IHS

I'm trying to enable response compression for css, js and html resources that are bundled as part of a Web application deployed to WebSphere v7. All HTTP traffic is routed to an IBM IHS HTTP server sitting in front of the WebSphere instance. I've…
Javaddict
  • 251
  • 2
  • 4
  • 12
0
votes
1 answer

Apache server response time increases after turning on deflate mod - is it possible?

My question is a rather simple one - I hope. I'm doing a webshop, and the site was extremely slow, so I ran a plenty of page speed tests accessible online, like googles's page speed test and followed the advices they gave. I did all the stuff that…
0
votes
0 answers

How to enable simple compression with mod_deflate/gzip on Apache within .htaccess

I have the following .htaccess file for my website which is hosted on a Linux, Apache and PHP 5.4.41 stack: # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME}…
user1554264
  • 1,204
  • 3
  • 22
  • 47
0
votes
1 answer

Losing image quality with apache deflate and mem_cache

I'm running my website under Debian 7, The following apache modules were enabled : mem_cache, cache, deflate But the problem is, all images was losing their quality! When i check my physical file, the quality is perfect. I disabled all of those…
0
votes
1 answer

Enabling compression (Amazon EC2)

I'm trying to enable compression on my EC2 instance by adding the following to my .htaccess: # Force compression for mangled headers. # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
Chuck Le Butt
  • 47,570
  • 62
  • 203
  • 289
0
votes
1 answer

How does Gzip / mod_deflate affect crawlers / spiders / robots (ultimately also my seo)?

I've been tasked to look into Gzip compression. I've figured out so far that is not just generally accepted, but also pretty common. Now my question is how does Gzip compression influence the crawlers that visit my page? What should I keep in mind…
Puddingboy
  • 127
  • 9
0
votes
1 answer

Setting a custom value to the DeflateBufferSize results in 500 internal server error

I'm trying to reset the DeflateBufferSize directive like so in my .htaccess file: DeflateBufferSize 1024 SetOutputFilter DEFLATE But the result of each page is then 500 internal server error(this happens even if I set it to its default value of…
Core_dumped
  • 1,571
  • 4
  • 16
  • 34
0
votes
1 answer

.htaccess for compression, browser caching, proxy caching, etc

Can someone provide me with an optimize .htaccess configuration that handles compression, browser caching, proxy caching, etc. for a typical website? Aside from my visitors, I'm also trying to make Google PageSpeed happy.
StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441
0
votes
0 answers

Why GZip compression doesn't work for .css and .js but only on .php file extensions

A strange problem occurs when GZipping files on our (updated?migrated) shared hosting server. Examine these two identical files in the the includes folder /_inc/ with exactly the same contents (php code) with the purpose of collecting, minifying and…
Sam
  • 15,254
  • 25
  • 90
  • 145
0
votes
1 answer

mod_deflate: 'Vary' header not set but unsettable for .css and .js files

I'm setting a website hosted on Apache/2.2.17. I don't have access to apache's installation directory nor httpd.conf file (just www folder with eventually some .htaccess files). I've got gzip compression enabled but .css and .js (the others files…
kiwixz
  • 1,380
  • 15
  • 23
0
votes
1 answer

Custom modules for the Apache HTTP server: what's the behavior of mod_deflate?

I wrote a custom module for the apache http server as described in: http://httpd.apache.org/docs/2.4/developer/modguide.html ap_rprintf(r, "Hello, world!"); I've been asked about the behavior of mod_deflate…
Pierre
  • 34,472
  • 31
  • 113
  • 192
0
votes
0 answers

Problems with mod_deflate on uri without trailing slash

I want to make mod_deflate working on my website. All works fine: for the css, js etc files, mod_deflate is working. When I go to host/city/, it also works fine. But when I call host/city it doesn't work. But I want to use the uri without trailing…
Nico
  • 39
  • 3
0
votes
2 answers

What configuration is responsible for a working deflate / gzip?

I had a look in my (standard configurated) httpd.conf on my Apache 2.2 webserver and I was not able to identify what configuration is responsibly that gzip compression is working fine? I searched for keywords like DEFLATE, AddOutputFilterByType or…
BITS
  • 121
  • 1
  • 11
0
votes
1 answer

Why is GZip compression not working

I have tried GZip code provided by gtmatrix and it works fine on many website but now when I try it on one of my website its not working. I have checked using phpinfo() and the GZip shows enabled. But when I check website it ask for GZip…
user2477139
  • 608
  • 1
  • 6
  • 21