If you are closely tuned in to the web world as I am, you may have heard that Google may include “web page load time” as one of their ranking factors in 2010. I heard about this, saw a few videos about this and read about this. Apparently, when Google talks about changing what makes people’s websites rank differently, people listen…and then talk about it themselves.
I run a bunch of different websites. Some of them have rather large page sizes. The reason they are so large is because of additional files beyond simple HTML that each page pulls in to make the web page behave correctly. These files, such as .js and .css files can get kind of big. Over the years, I didn’t really dig too deeply into the page size issue because the sites get fairly good traffic. I just let things ride.
A few days ago, I came across a post on a forum that talked about mod_gzip or otherwise known as GZIP. This is software that you can install on your web server that compresses your web pages up to 70%. Google recommends that webmasters use GZIP to speed up their websites. Google likes to present its visitors with nice speedy pages in their search results.
I read that it’s pretty easy to deploy GZIP and that it really shouldn’t take more than a few minutes (if it’s already installed on your server). I decided to give it a try. So I did. It didn’t work. Hmmm.
I called my web host and started asking questions. I was like, YO B%^&*, what up with my GZIP??? No really, I was polite. I asked about why GZIP wasn’t giving me any compression results and they told me that I was running Apache2 and that mod_deflate was already installed, not mod_gzip. All I needed to do was to deploy it. I kind of like the name “GZIP” better than “DEFLATE” but who am I to argue?
By the way, here are some good resources on using GZIP and DEFLATE:
– How To Save Traffic With Apache2’s mod_deflate
– Mod_Deflate vs. Mod_Gzip , Comparing the Two
First, I asked the web host to deploy mod_deflate on only one domain. I wanted to gauge the results and also take a night to see if anything got screwed up from it. They were agreeable and did the following:
At your request I enabled mod_deflate for one domain on server 123456:
http://www.mydomain.com/
This was done by modifying:
/my/path/mydomain.com/conf/vhost.conf
with the following content:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
I checked the website in questions and low and behold, I saw web pages that were being compressed. How could I tell? I used these resources:
– Port80 Software Compression Check
– Web Page Analyzer – 0.98 – from Website Optimization
I checked out some stuff overnight and since everything looked fine in the morning, I gave the web host a call back and asked them to undo what they did to that individual domain and set it up server-wide. They put the server back the way it was and set up mod_deflate to compress all the websites on the server by doing this:
Created a file /my/path/mod_deflate.conf
with the following line:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript
That was about it. Since Apache2 comes with mod_deflate installed already, all we had to do was to deploy it. We did this both for an individual domain and server-wide.
I bet you want to know about the results, right? Okay. Well, I can tell you that I had some web pages that were over 400kb. They are now running at about 165kb. I also had some web pages that were about 445kb. They are now running at about 45kb. That’s about 10% of what it was. Is that crazy? Yes, it’s nuts.
Next week, I am going to deploy mod_deflate on my other web server. That should really make some positive changes.
There are a few things you should know. The first thing is that if you decide to do this and have a cable internet connection where you are connected to the internet, you most likely won’t notice much of a change. I read that this has something to do with packets. I am not that smart, so I just took this statement as face value. Although, I run cable and didn’t really notice much of a change. People who use DSL and dial up will definitely see some speed improvements from the smaller web page sizes.
Also, if you are running a website and are using a shared server, you may not be able to use mod_gzip or mod_deflate. Since both of these modules use an increased amount of processing power, many web hosts won’t allow its use. If you aren’t aware, some of these web hosts pack like 10 billion websites on each server. Any increase in CPU demand is going to cause problems. Still, you should give them a call to see what they say. You might get lucky.
Leave a Reply