Thursday, September 20, 2007

I use PHP CodeIgniter support for GZIP compression but I had to do some changes in a CI library for to compress javascript libraries but thanks to Joan Piedra and his post in jQuery Mail list I see this solution better:

in the .htaccess:

<ifmodule mod_headers.c>

<ifmodule mod_deflate.c>


# Compress some text file types

AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript



# Deactivate compression for buggy browsers

BrowserMatch ^Mozilla/4 gzip-only-text/html

BrowserMatch ^Mozilla/4\.0[678] no-gzip

BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

</ifmodule>

</ifmodule>



NOTE: It doesn't work with Apache version < 2 web servers. You need deflate and headers module.

Labels: ,

1 comments, Post a CommentPosted by posted by SeViR @ 10:57 AM
1 Comments
Oct 16, 2007 3:48:00 AM, Blogger NEO_JP said:
Hola Jose, me alegro que te haya servido el pequeño truco del htaccess + mod_deflate.

Gracias por el credito, un saludo.  
Links to this post
This design is under copyright of SeViR CW © 2007