If you are into Apache and web hosting, you are always open and looking at ways to increase the speed and performance of your website. Often times, it is your client telling you that the web app you created is too slow, or you are finding that minifying and using image splices is just adding that extra step that could use some more efficiency. There are a number of very common things that take a website and drastically degrade it’s performance. Therefore Google has created and now just released mod_pagespeed 1.0 for Apache, which should aid in many of these troublesome areas.
Are you interested in seeing how your page performs and ranks compared to others, you can use this site, Google’s Page Speed Test, to see how your page maps up and to see what areas that your website lags. I have done complete website page analysis across large public sites that analyze exactly this and it truly helps in building a plan for optimization. The trouble is executing on that optimization project, so mod_pagespeed may just be the way to take care of some of these.
mod_pagespeed does six major improvements on a clients interaction with a server’s pages.
- Optimizing Caching – Browser caching and proxy caching are often times forgotten when serving up files. Why do you need to serve up files that have not changes and already exist inside of a clients browser cache? This simple and easy enable browser cache allows files and data to be stored in client browsers and proxies to reduce the stress of downloading files multiple times for display.
- Minimizing Round-Trip Times – Round-Trip times include a range of items mostly in the area of number of requests. Redirects, DNS Lookups, and Bad Requests take up tremendous amounts of time as each is a separate HTTP request. On top of that, multiple external JS files, CSS files, and Images can be combined into a single file to allow a single request / stream for a user. The order of these requests and methods of pulling these files in asynchronously also load your pages quicker and easier.
- Minimizing Request Overhead – Minimizing the size of a request header can improve (slightly) upon how much data is being sent back to the server on a request. Typically, per request, browsers send Cookies, Fields, Resource URL’s, and Referrer. Minimizing the overhead as to, what data is needed, and when won’t be a huge plus, but will provide improvement.
- Optimizing Browser Rendering – Browser rendering techniques are simple. By simply placing your CSS in the correct locations, avoiding CSS expressions, using effective and descriptive CSS selectors, you can quickly speed up your CSS rendering. In addition, specifying your character sets will remove the unnecessary computation, as does specifying image dimensions so the browser doesn’t have to figure it out itself.
So, take care of a good chunk of all your standard optimization efforts in one sweep, implement mod_pagespeed. It sounds like a great idea for me. I should try it out on some of my dedicates. Unfortunately, this is only for Apache, not IIS. I am very excited to give it a shot.
Here’s a tutorial on how to enable mod_pagespeed Apache module for DreamHost:
Here’s a very descriptive video on what mod_pagespeed is and how it works. It is an hour long video, but I highly suggest it.
I can probably write up a quick tutorial on how to enable manually for a Linux Apache box, but if you know how to do your httpd.conf, you should be well on your way.