Apache::Compress man page on OpenServer

Man page or keyword search:  
man Server   5388 pages
apropos Keyword Search (all sections)
Output format
OpenServer logo
[printable version]

Compress(3)	      User Contributed Perl Documentation	   Compress(3)

NAME
       Apache::Compress - Auto-compress web files with Gzip

SYNOPSIS
	 PerlModule Apache::Compress

	 # Compress regular files - decides whether to compress by
	 # examining the Accept-Encoding header
	 <FilesMatch "\.blah$">
	  SetHandler perl-script
	  PerlHandler Apache::Compress
	 </FilesMatch>

	 # Compress output of Perl scripts
	 PerlModule Apache::Filter
	 <FilesMatch "\.pl$">
	  SetHandler perl-script
	  PerlSetVar Filter on
	  PerlHandler Apache::RegistryFilter Apache::Compress
	 </FilesMatch>

	 # Guess based on user-agent
	 <FilesMatch "\.blah$">
	  SetHandler perl-script
	  PerlSetVar CompressDecision User-Agent
	  PerlHandler Apache::Compress
	 </FilesMatch>

DESCRIPTION
       This module lets you send the content of an HTTP response as gzip-com-
       pressed data.  Certain browsers (Netscape, IE) can request content com-
       pression via the "Accept-Encoding" header.  This can speed things up if
       you're sending large files to your users through slow connections.

       Browsers that don't request gzipped data will receive regular noncom-
       pressed data.

       Apparently some older browsers (and maybe even some newer ones) actu-
       ally support gzip encoding, but don't send the "Accept-Encoding"
       header.	If you want to try to guess which browsers these are and
       encode the content anyway, you can set the "CompressDecision" variable
       to "User-Agent".	 The default "CompressDecision" value is "Header",
       which means it will only look at the incoming "Accept-Encoding" header.

       Note that the browser-guessing is currently using a regular expression
       that I don't think is very good, but I don't know what user agents to
       support and which not to.  Please send me information if you have any,
       especially in the form of a patch. =)

       This module is compatibile with Apache::Filter, so you can compress the
       output of other content-generators.

TO DO
       Compress::Zlib provides a facility for buffering output until there's
       enough data for efficient compression.  Currently we don't take advan-
       tage of this facility, we simply compress the whole content body at
       once.  We could achieve better memory usage if we changed this (at a
       small cost to the compression ratio).  See Eagle book, p.185.

AUTHOR
       Ken Williams, KWILLIAMS@cpan.org

       Partially based on the work of several modules, like Doug MacEachern's
       Apache::Gzip (in the Eagle book but not on CPAN), Andreas Koenig's
       Apache::GzipChain, and an unreleased module by Geoffrey Young and
       Philippe Chiasson.

SEE ALSO
       perl(1), mod_perl(1), Apache::Filter(3)

perl v5.8.8			  2004-11-17			   Compress(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OpenServer

List of man pages available for OpenServer

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net