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
7
votes
3 answers

Chrome Devtool do not show Content-Encoding in response headers

I´m enabling gzip compression to increase the speed in Google PageSpeed Insights: If compressed mantaspersonalizadas.com/fonts/Cocktail-Shaker.svg, would save 144.1 KB (65% reduction). If compressed…
Funny Frontend
  • 3,807
  • 11
  • 37
  • 56
6
votes
2 answers

YSlow gives F grade to files compressed with mod_deflate

I'm using mod_deflate on Apache 2.2 and the compression level is set to 9. I've fine tuned every possible aspects of the site based on the recommendations of YSlow (v2) and have managed to get an overall A grade (Total Score: 91) as well as on all…
miCRoSCoPiC_eaRthLinG
  • 2,910
  • 4
  • 40
  • 56
6
votes
3 answers

Enable mod_deflate to send Content-Encoding: gzip

EDIT I have found that the problem is actually php minify. This was sending the deflated content instead of Apache. I'll find more on this. According to High Performance Web Sites, if I enable mod_deflate in Apache 2.x, by adding the following line,…
Sabya
  • 11,534
  • 17
  • 67
  • 94
6
votes
1 answer

Mod_deflate and mod_header settings?

I've finally gotten a VPS hosting account set up this allows me to use mod_deflate and mod_header (of course). I'm attempting to make my site faster by YSlow's guidelines which include gzipping (via mod_deflate) the pages and setting a long expire…
Charlie
  • 11,380
  • 19
  • 83
  • 138
6
votes
1 answer

Apache RewriteRule discards SetInputFilter DEFLATE config directive

I have the following (simplified) folder/file structure: /.htaccess /test.php /api/web/index.php And the following directive in apache config: SetInputFilter DEFLATE …
Super Rey
  • 375
  • 2
  • 11
6
votes
0 answers

Consuming response headers in Apache Output filter

I am writing an apache module output filter that needs to consume a couple of internal-only response headers. These response headers are set by a perl based application running in the backend. The APR function I am using in my output filter is:…
IM42
  • 138
  • 10
6
votes
3 answers

Combining deflate and minify - am i creating overhead?

I minify my css and js files on the fly with google.codes minify. I have also set my .htaccess to use deflate on all my css and js files - the reason beeing some js files (like shadowbox and tinymce) reference to other js files in the code. So i'm…
Mark Nolan
  • 61
  • 2
6
votes
1 answer

Apache GZIP compression not compressing js/css in other directories

I'm trying to use 'mod_deflate' (and other requires extensions) to apply GZIP compression to my local hosted site (Apache, 2.4.4.0). This is the code I'm using (.htaccess): SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/css…
Jevgeni Geurtsen
  • 3,133
  • 4
  • 17
  • 35
6
votes
3 answers

Compressing HTTP request with LWP, Apache, and mod_deflate

I have a client/server system that performs communication using XML transferred using HTTP requests and responses with the client using Perl's LWP and the server running Perl's CGI.pm through Apache. In addition the stream is encrypted using SSL…
user22410
  • 61
  • 1
  • 3
5
votes
2 answers

How to make Apache mod_deflate and Transfer-encoding : Chunked work together?

I am trying to use the bigpipe concept on our website. That means trying to send the response in chunks instead of sending it as a whole so that user feels that page is fast. I am successful in doing that by using the flushBuffer method on the…
Sameer Shah
  • 123
  • 1
  • 9
5
votes
2 answers

Apache benchmark load-test: mod_deflate enabled vs disabled

I'm running a simple load test with apache benchmark: ab -n 1 http://localhost/mysite/index/index/ I want to see performance with/without mod_deflate In my httpd.conf: #mod_deflate enabled LoadModule deflate_module…
luca
  • 36,606
  • 27
  • 86
  • 125
5
votes
5 answers

PHP + gzip: close connection and continue executing

I am responsible for the backend portion of an API, written in PHP, which is primarily used by a Flash client. What happens right now is: the Flash client makes a call, the backend loads the necessary data, does any necessary processing and post…
Jay Paroline
  • 2,487
  • 1
  • 22
  • 27
5
votes
2 answers

mod_deflate in .htaccess and google pagespeed

i have a linode sever with centos 6 , as it wont support mod_gzip, i am using mod_deflate. this is my code in .htacess SetOutputFilter DEFLATE …
Serjas
  • 2,184
  • 4
  • 21
  • 35
4
votes
1 answer

Why is mod_deflate not supported by my hosting company?

I was just doing some testing with YSlow and it's telling me: Grade F on Compress components with gzip: There are 10 plain text components that should be sent compressed I know that Apache 1.3 uses mod_gzip while Apache 2.x uses mod_deflate, and…
cwd
  • 53,018
  • 53
  • 161
  • 198
4
votes
2 answers

Get Apache to auto-decompress a file, but only if needed

I'd like to keep all the static files of my web-server locally compressed, and to serve them either compressed or not, depending on the request. The answers in How can I pre-compress files with mod_deflate in Apache 2.x? , are close, since indeed by…
Stefan
  • 27,908
  • 4
  • 53
  • 82
1
2
3
11 12