Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a weird problem.

I have two exact website on two servers - dev and qa.

The dev one shows that my javascript size is 100kb, but the qa says 400kb. When I save the script on my local, it is 400kb.

I looked at the header of the javascript on the dev and it looks's sending

"Content-Encoding   gzip".

What is this and how do I enable this on the qa to make my script smaller?

share|improve this question
It's compression. How you enable it depends on what web server you're running, could you provide that information? – Shane Madden Dec 19 '11 at 19:24
@ShaneMadden // I'm running ubunt. – Moon Dec 19 '11 at 19:25
That's your OS, on top of which there are a myriad of options for HTTP servers. Do you know which one you use? – Shane Madden Dec 19 '11 at 19:28
@ShaneMadden // ah! I'm using apache. I think I found a link. is that correct one? and...please make a new post...I like choose your comment as an answer. – Moon Dec 19 '11 at 19:53
up vote 2 down vote accepted

This should mostly just be a matter of making sure that your modules and settings match between the two servers.

Run a2enmod deflate on the server that's not compressing to make sure the module's enabled, then check to be sure the configurations match (server config in apache2.conf, site config in sites-available, and module config in mods-available/deflate.conf), do a service apache2 restart to apply any changes, and you should see compression behave the same across the servers.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.