tags:

views:

36

answers:

4

Hi, I am working on a webpage and I use XSLT as template engine.

I only send XML and the XSLT file to the requester and let the receiver's browser render it in HTML.

I would like to know how I could GZip the XSL Stylesheet and maybe the XML I'm sending to the requester.

Thank you in advance.

A: 

Use ob_gzhandler

David Dorward
I added @ob_start("ob_gzhandler") atop my XML and XSLT file and it seems to work according to Firebug. Even better, I found a way to add it to htaccess file and it still works but apparently it wont apply gzip to JS and CSS files. Why?
Steve Thomas
+1  A: 

If you're using Apache, you should to take a look into mod_deflate

Rubens Farias
A: 

Look into HTTP Compression. This is something you set on your webserver that causes all traffic to be compressed, IF a client's browser supports it.

http://en.wikipedia.org/wiki/HTTP_compression

Jason
A: 

What web server are you using? This will probably be more of a setting on your webserver than coding on your part.

David
I use Apache on my local server
Steve Thomas