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

mod_deflate is not working for php generated page

mod_deflate not working for php generated page. I have Apache v2.4.7 with php v5.5.9 on Ubuntu 14.04.5 (LTS). This module is working for static html pages and other files like CSS, js etc. here is my php information…
Sunny
  • 119
  • 2
  • 18
0
votes
1 answer

Mod_deflate not working on localhost

I have XAMPP with apache version 2.4.25 and PHP 5.6, then i enabled mod_deflate and mod_filter on httpd.conf in apache folder: LoadModule deflate_module modules/mod_deflate.so LoadModule deflate_module modules/mod_filter.so I installed a new…
Andhika R.K.
  • 426
  • 1
  • 11
  • 30
0
votes
1 answer

Apache : empty body when deflate input

When I send a gzip request to apache, when apache is configured with "SetInputFilter DEFLATE", my request body is empty on apache output. The content is not empty but still compressed whithout this configuration. Do you know what am I missing ? Do…
Johann Goulley
  • 405
  • 14
  • 25
0
votes
1 answer

How to remove gzip encoding from nonexistent images in httpd-deflate.conf?

What I have at this moment. In httpd-deflate.conf in Location section: SetEnvIfNoCase Request_URI \ \\.(?:gif|jpe?g|jpg|png|rar|zip|exe|flv|swf|mov|wma|mp3|mp4|avi|mp?g)$ no-gzip dont-vary In .htaccess: Options +FollowSymlinks RewriteBase…
0
votes
1 answer

Mod_Deflate and GoDaddy issues

I use the following quip on a htaccess file to enable compression on a GoDaddy server; #################### # GZIP COMPRESSION # #################### SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml…
Sefam
  • 1,712
  • 2
  • 23
  • 40
0
votes
0 answers

Htaccess how to mod_deflate javascript file ending in suffix .js?ver=3.1

I use mod_deflate to speed my site up. I have one JavaScript file that will not deflate (I believe because it ends .js?ver=3.1 rather than .js). Below is my .htaccess code: AddOutputFilter DEFLATE js css
0
votes
0 answers

Apache GZip compresion using mod_deflate

I was trying to configure mod_deflate for compression in Apache 2.2 and did following changes in httpd.conf file. LoadModule deflate_module modules/mod_deflate.so SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/plain text/xml…
Gautam
  • 3,276
  • 4
  • 31
  • 53
0
votes
1 answer

HTTP Header Content-Length mod_deflate problems

Hi I have a HTTP Header in a file called download.php that forces a download. The PHP Code: $file = 'https://www.website.com/downloads/'.$download->stitle.'.zip'; header('Content-Type: application/octet-stream'); header('Content-Disposition:…
Ash
  • 792
  • 1
  • 6
  • 23
0
votes
2 answers

Check are the base64 images gzipped or not

I am working on a web app, the flow is something like that: the browser getting images from a server as a base64 data, then JavaScript encoding those images etc. (as a web server we are using apache with mod_deflate' module) I want to check are…
nix
  • 61
  • 4
0
votes
1 answer

mod_deflate for css and js

I'm using mod_deflate to compress my web pages but I see that only the HTML is compressed no compression for the css. Documents (1 file) 4 KB (18 KB uncompressed) http://localhost/web/ 4 KB (18 KB uncompressed) Images (16 files) 96 KB Objects (0…
medk
  • 9,233
  • 18
  • 57
  • 79
0
votes
0 answers

Caching compiled css and js and clears cache on changes in files

I have been going through lots of article, where a proper example for caching mechanism is not penned down. All tutorials describes about that and a single line demo which, I guess, never really optimizes. I have compiled css and js using grunt. I…
user6202450
0
votes
1 answer

Cannot get compression/deflate to work on Amazon EC2 instance for JSON API

I'm using Apache httpd 2.4.16 (on Amazon EC2 linux), so the latest FilterProvider syntax applies. I'm trying to ensure the API responses which are of type application/json are compressed. Some of my responses are 100 KB in size, which is why…
Ouroboros
  • 1,432
  • 1
  • 19
  • 41
0
votes
1 answer

How to set mod_deflate preferred compression method to deflate

mod_deflate always sends gzip data when the request header Accept-Encoding is gip, deflate. How can I tell mod_deflate to prefer to send deflate (NOT zlib) instead of gzip? If this isn't possible...why would the develpers name the module mod_deflate…
David Murdoch
  • 87,823
  • 39
  • 148
  • 191
0
votes
1 answer

YSlow tells me site is not compressed even though it is

"Grade F on Compress components with gzip There are 19 plain text components that should be sent compressed" I have checked the compression of the main page, as well as all 19 components individually using…
Voltzz
  • 1
  • 1
0
votes
1 answer

how to tell mod_deflate is disabled in apache?

Is there a line for .htaccess that can tell mod_deflate is disabled on Apache? Something like this:
leon
  • 35
  • 5