# Css and js gzip Compression

**URL:** <https://www.ruby-forum.com/t/css-and-js-gzip-compression/179000>\
**Category:** Deployment\
**Created:** [November 15, 2009, 12:16pm UTC](https://www.ruby-forum.com/t/css-and-js-gzip-compression/179000 "2009-11-15T12:16:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xinu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/f6c823/32.png) [@xinu](https://www.ruby-forum.com/u/xinu)\
**Post date:** [November 15, 2009, 12:16pm UTC](https://www.ruby-forum.com/t/css-and-js-gzip-compression/179000/1 "2009-11-15T12:16:01Z")

</div>

hi.

I use apache with passenger and I want to enable the gzip Compression.

I use the apache sample configuration  
[mod\_deflate - Apache HTTP Server](http://httpd.apache.org/docs/2.0/mod/mod_deflate.html) with following  
filters  
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css  
text/javascript

The compression works fine if I include the .js or .css files in this  
way.

But if I use the javascript\_include\_tag or the stylesheet\_link\_tag the  
compression doesn’t work.

Why does this not work?

thanks,  
Michael
