Is it possible to gzip css & js files with Yii

Presumably this technique just gzips php files:

How about the js/css files?

There’s an extension to do that (can’t remember now the name). But it didn’t work very well to me.

What I use to do: I compress myself the bigger js as css (using some free tools online on web) and resave then.

I think this one:

Shouldn’t this .htaccess file solve some problems:

<IfModule mod_deflate.c>

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


As Ismale suggested, serving css and js content as gzip can be better handled via apache (or web servers in general).