...

View Full Version : how to gzip one or more page



captain
11-20-2007, 02:37 PM
like:http://extjs.com/deploy/dev/examples/feed-viewer/view.html

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.

aedrin
11-20-2007, 03: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.

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

use .htaccess is a nice way.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum