Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 like..it'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. httpd.apache.org/docs/2.0/mod/mod_deflate.html 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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.