# GZIP not compressing .js and .css files

**URL:** <https://www.ruby-forum.com/t/gzip-not-compressing-js-and-css-files/215382>\
**Category:** NGINX\
**Created:** [January 2, 2012, 6:08pm UTC](https://www.ruby-forum.com/t/gzip-not-compressing-js-and-css-files/215382 "2012-01-02T18:08:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 2, 2012, 6:08pm UTC](https://www.ruby-forum.com/t/gzip-not-compressing-js-and-css-files/215382/1 "2012-01-02T18:08:56Z")

</div>

Hi,

My server doesn’t appear to be compressing .js and .css files…

I have the following in my /etc/nginx/nginx.conf…

#### 

```
    gzip on;
    gzip_disable "msie6";

    gzip_vary on;
    # gzip_proxied any;
    gzip_comp_level 1;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json

```

application/x-javascript text/xml application/xml application/xml+rss  
text/javascript;

#### 

Pagespeed in Chrome is telling me to enable compression and lists all  
the .js and .css files…

Have I missed something?

TIA

Posted at Nginx Forum:

> **[GZIP not compressing .js and .css files..](https://forum.nginx.org/read.php?2,220747,220747#msg-220747)**
>
> Hi, My server doesn't appear to be compressing .js and .css files.. I have the following in my /etc/nginx/nginx.conf.. #### gzip on; gzip\_disable "msie6"; gzip\_vary on; # gzip\_p
