Apache mod_deflate question

This is a discussion on Apache mod_deflate question within the Windows Web Servers forums, part of the Web Server and Related Forums category; I'm trying to use Apache's mod_deflate to compress html pages and then send them to the client. So ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-08-2004
Ashley Swinson
 
Posts: n/a
Default Apache mod_deflate question

I'm trying to use Apache's mod_deflate to compress html pages and then send
them to the client. So far, all I have done is add the following code to
the httpd.conf file:

<Directory C:/sites/site1>
AddOutputFilterByType DEFLATE text/html text/plain text/xml
</Directory>

The directory C:/sites/site1 is where one of my html pages is, site1.html.
I'm trying to test if Apache is using the mod_deflate module. Did I
configure Apache correctly to use the module? If so, how can I tell if
Apache is using it correctly or not (how can I test it)?


  #2 (permalink)  
Old 07-08-2004
Phil Frisbie, Jr.
 
Posts: n/a
Default Re: Apache mod_deflate question

Ashley Swinson wrote:

> I'm trying to use Apache's mod_deflate to compress html pages and then send
> them to the client. So far, all I have done is add the following code to
> the httpd.conf file:
>
> <Directory C:/sites/site1>
> AddOutputFilterByType DEFLATE text/html text/plain text/xml
> </Directory>


You also need to enable mod_deflate by uncommenting this line:

LoadModule deflate_module modules/mod_deflate.so


And if you have includes enabled you should edit the includes line like this:

AddOutputFilter INCLUDES;DEFLATE .shtml

> The directory C:/sites/site1 is where one of my html pages is, site1.html.
> I'm trying to test if Apache is using the mod_deflate module. Did I
> configure Apache correctly to use the module? If so, how can I tell if
> Apache is using it correctly or not (how can I test it)?


One quick and dirty way is to load the page with Netscape (Mozilla will probably
work also) and view the 'Page Info'. Netscape shows the actual bytes downloaded
which you can compare with your page size on the server. IE always shows the
uncompressed size.

--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

  #3 (permalink)  
Old 07-09-2004
Claire Tucker
 
Posts: n/a
Default Re: Apache mod_deflate question

On 9 Jul 2004 01:35:51 -0700, "Jorge Schrauwen"
<jorge.schrauwen@gmail.com> wrote:

>You do a get request via telnet,
>if it looks all messed up, it is gzipped if it look normal it isn't


Of course, you have to remember to tell the server you "accept" the
encoding you want to test:

$ telnet server.com 80
GET / HTTP/1.0
Accept-Encoding: deflate
Host: server.com

You must press enter twice after the final line to signal the end of
the request.

If you don't include that Accept-encoding line, the server (if
configured sensibly) will serve plain text assuming that the client is
not equipped to decode the encoded data.

The response should look "all messed up", as Jorge mentioned, as well
as including the response header line:
Content-Encoding: deflate

Best regards,
-Claire
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:17 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0