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
1
vote
1 answer

Apache mod_deflate based on url parameters

Can mod_deflate module in apache be invoked based on url parameters and not for all the server requests
Rakesh
  • 5,793
  • 8
  • 36
  • 37
1
vote
0 answers

mod_deflate without system zlib

I am building Apache httpd and I want to build it with the module mod_deflate. For this module, I need zlib. So I built zlib on my own. When calling ./configure for Apache httpd, I call it with this parameters: ./configure \ --enable-deflate \ …
MrPython
  • 162
  • 1
  • 8
1
vote
2 answers

Opposite of LoadModule Apache (.htaccess) directive

I guess you all know the LoadModule directive form mod_so. I want to do the opposite, unload module for specific directory via .htaccess file. Does UnloadModule exist? I want to reach highest script compatibility by *disabling all modules except…
Rok Kralj
  • 46,826
  • 10
  • 71
  • 80
1
vote
1 answer

How to disable gzip compression in htaccess for a folder

I am looking to disable the gzip folder for folder xxx. looking in StackOverflow, I have tried this : SetEnvIf Request_URI ^/xxx(.*) no-gzip dont-vary But it doesn't work. I have added in here : SetEnvIf Request_URI…
dock21
  • 33
  • 5
1
vote
0 answers

Apache2.4 and AEM and Json encoding+gzip

Json file are missing below encoding once moved from Apache2.2 to Apache2.4 and AEM dispatcher 4.3.3, header appears if i set header for json files with locationmatch. deflate entry is there for json but this is ignored. AddOutputFilterByType…
Rakesh
  • 35
  • 5
1
vote
2 answers

JSON GZIP Design choice

I am working on a web application with dynamic content generated by a servlet running in a JBoss container and static content/load balancing being handled by Apache + mod_jk. The client end uses jQuery to making AJAX requests to the servlet which…
nsfyn55
  • 14,875
  • 8
  • 50
  • 77
1
vote
0 answers

How to put SetInputFilter DEFLATE in httpd.conf file of Apache so to decompress the Gzip compressed request body

I am running a java application with tomcat as servlet container and Apache as web server and have Made the connection between these two using APJ connector. I am making a http post request to this server and the body of request is Gzip compressed.…
Neha Singh
  • 25
  • 5
1
vote
1 answer

Speeding up Websites via Simple Apache Settings in Htaccess [zlib.output_compression + mod_deflate] a Syntax

Imagine these two chunks of code residing in htaccess for speeding up the website. With php 5.2.3 on apache 2.0 block A # preserve bandwidth for PHP enabled servers php_value zlib.output_compression 16386 block…
Sam
  • 15,254
  • 25
  • 90
  • 145
1
vote
1 answer

Java can't unzip files inside apache web server directory - java.util.zip.ZipError: zip END header not found

I am having weird issues with a java application unzipping files on an apache server. I have an apache server in which some other applications uploads zip files. e.g. the directory is /var/www/html/fles When I now start my java program to unzip the…
Christoph S
  • 697
  • 1
  • 6
  • 29
1
vote
1 answer

Benefits of mod_pagespeed over mod_deflate

The SO post here explains what mod_pagespeed does, but I'm wondering if I would notice any significant difference in page load time with this installed on a server that is already using mod_deflate to compress files. If it is worth installing, are…
Nick W
  • 877
  • 2
  • 15
  • 30
1
vote
3 answers

htaccess mod_deflate does not work on shared server

I'm developing a website in PHP and I have large JS files that I want to compress. So, I added this in my .htaccess file: SetOutputFilter DEFLATE It works great on my local wamp server…
Manny Calavera
  • 6,815
  • 20
  • 60
  • 85
1
vote
0 answers

Browser does not decompress gzip assets

I've enabled gzip for by Ruby on Rails application using webpack After asset:precompile, I can see gzipped assets in my public folder. This is my configuration for Apache, where I'm asking it to serve gzip assets when available -
Steve Robinson
  • 3,759
  • 3
  • 36
  • 57
1
vote
1 answer

Google Insights says enable compression for the page itself

I am on Apache 2.4 On the site I have enabled compression in the .htaccess file as follows: AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE…
Dimentica
  • 795
  • 2
  • 11
  • 30
1
vote
1 answer

deflate svg files with mod_deflate

i have the mod_deflate for apache enable but it doesn't works on svg files... how can I enable it? or at least allow the svgz extension on prestashop so that I can upload it directly compressed. Thank you # ~~start~~ Do not remove this comment,…
Marwane
  • 189
  • 2
  • 14
1
vote
0 answers

I want to compress the output for speed up loading of website in browser.

I have tried mod_deflate enabling but failed in it. I have tried every code given in stackoverflow but still it is not loaded in modules. Then i tries enabling zlib. In phpinfo() it is showing enabled but output compression is off. I have tried in…