View Full Version : how to gzip one or more page

11-20-2007, 03:37 PM

it uses ext , as we know ext-all.js is so big nearly 500k . but when I watch in firebug it is only 125k , I know it is gziped server side , but when I watch the soruce code , there is nothing special , just

<script src="ext-all.js"></script>
as I know , if we want to gzip some file , it should be

<script src="ext-all.php"></script>

and in ext-all.php , we deal with ext-all.js.

so I confused how to do it.

I wonder if I expresses clearly , because my English is not so good.

11-20-2007, 04:20 PM
Compressing data is something the server does, and then lets the client know that what it is about to receive is compressed.

They could have set up *.js to be parsed by PHP, or they have an automatic compressing filter (say a plugin for Apache) set up in the server that does it to everything.

It's not just limited to PHP.

11-21-2007, 08:09 AM
thanks aedrin , I got the answer!

use .htaccess is a nice way.