tags:

views:

420

answers:

2

Hi.. my site is all happily Gzipped according to:

http://www.gidnetwork.com/tools/gzip-test.php

However when I run it through Yslow I get a F for Gzip and it lists all of my scripts as components that are not gzipped.

Any ideas ?

A: 

If you used the method in the linked pages to gzip your site, it won't have any effect on the scripts as they are not run through PHP. You'll need to either:

1) configure your webserver of choice (apache2 uses mod_deflate)

2) serve your .js files through php:

<?php ob_start('ob_gzhandler'); echo file_get_contents('whatever.js'); ?>
Marcel Guzman
+1  A: 

Have a look in the headers in Firebug and check that the browser is sending

Accept-Encoding     gzip,deflate

in the request header and that

Content-Encoding    gzip

is being sent by the server in the response header (indicating that gzipping has been applied).

djch