0

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?

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
Moon
  • 2,123
  • 4
  • 24
  • 23
  • 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. http://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

1 Answers1

2

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.

Shane Madden
  • 114,520
  • 13
  • 181
  • 251