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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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)? |
|
|||
|
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 |
|
|||
|
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 | |
|
|