9 Tips to Make Your Website Load Much Faster (Part 1)
Print Article
9 Tips to Make Your Website Load Much Faster (Part 1)
The goal of this article is to determine whether or not the cause of your website’s latency is due to your web host or due to the way you have constructed your site. This article will use examples from prominent websites and explain how to use the tools that they employ to ensure that their sites are served to their users quickly
1. Server Location: Closer is Faster - Google is estimated to have 450,000 – 1,000,000+ servers located in cities worldwide. This helps ensure Google’s website loads quickly in part due to the minimal distance the data has to travel from their server to your computer. You can get an idea of how far away your server is by conducting a simple ping test. If your web hosting company’s server is located more than 40m/s away, you may want to look into a new web hosting provider or ask your current provider to move you to a closer data center.
2. Your Images Aren’t Optimized - Yahoo! has approximately 40 images on it’s homepage. One of the reasons the site loads quickly is that the images are small, scaled correctly and in the proper format. All of Yahoo’s menu buttons and logos are GIF files which load with ease, you want to use GIFs as much as possible on your own site as well. For photographs you will want to use JPEGs exclusively as they compress an image’s size without sacrificing quality.
Facebook is another popular website that relies heavily on images. A standard Facebook image is 600×420 pixels. Of course, only one image is displayed per page, which is why the page loads quickly:
If you have a website that displays up to five photos on one page that are similar to the one above, you will want to save them from your image editing program at about 75-85% quality to ensure your page loads quickly. If you have ten, you will want to scale down to about 60% quality. The more images you have, the longer your site will take to load, so you will want to scale the quality of the images down accordingly.
3. Enable Caching - PHP caching is a server side improvement that you can make to decrease site load times. Let’s take a look at an example from Wordpress, a popular, but resource intensive application. When PHP caching is enabled and a visitor goes to a page on the site, the server compiles the page once and the caching plugin then saves the page as a static html file. It then tells Wordpress that the next time the page is loaded, the html file should be served. This saves the server from having to run the queries and compile php pages again. You can also have your web hosting company load an application on your server like Zend Optimizer which will boost the performance of anything written in PHP.
4. Your Web Hosting Company’s Equipment is Cheap - Often times web hosting providers will cut costs by purchasing the cheapest parts available for their servers, routers and switches. Quality equipment is important as it helps ensure the system operates efficiently, thus making your page load quickly. Google depends on reliable equipment to guarantee their millions of search queries are served as quickly as possible. Look below to compare specs from a name brand server and a generic server:

Related posts:
- 9 Tips to Make Your Website Load Much Faster (Part 2) 5. Your Bandwidth Is Slow - Most larger web hosts...
Related posts brought to you by Yet Another Related Posts Plugin.
Comments
Thanks for the comment viralpatel, your tutorial is a great place to learn more about implementing Gzip. Dojo ShrinkSafe is another great utility for compressing javascript and more information about both programs can be found in Part 2 of this article!
Things that really help your website are:
- IMAGE OPTIMIZATION:
- – Images sprites:
http://websitetips.com/articles/css/sprites/
- FILES COMPRESSION AND CACHING:
- – CSS, JavaScript minification:
- – - Info: http://en.wikipedia.org/wiki/Minify
- – - CSS tool: http://www.cssoptimiser.com
- – - JavaScript: http://fmarcia.info/jsmin/test.html
- – Compressing Files with GZIP:
- – - Info: http://www.whatsmyip.org/http_compression/phpgzip/
- – Caching Output:
- – - PHP Script: http://www.addedbytes.com/php/caching-output-in-php
Other helpful tips would be to put CSS on top in the header and Javascript after the CSS files or at the bottom of the page when possible, this helps the page render graphics first then adding functionality with Javascript after the pretty stuff has come.
Splitting your content within multiple subdomains can help since browsers like IE can only make 1 request to a domain at a time. if you split your content across multiple subdomains like images.mydomain.com and css.mydomain.com IE can load several files at the same time.
More information can be found on this post:
http://blog.delaranja.com/10-optimization-tweaks-to-speed-up-adegga/
Here’s my article on optimizing ExpressionEngine sites, it’s not really EE-specific for the most part.
http://jackmcdade.com/2009/05/optimizing-expressionengine-sites-for-minimum-load-times-part-1/
Your links provide great additional resources for our readers René, thanks for the comment. Loading Javascript after CSS or at the bottom of the page is also a great way for users to access the main content of a site faster. Jack recommends loading Javascript right before the closing </body> tag as long as the script is not required for onLoad effects, which is an important consideration.
Great post! I’ll subscribe right now wth my feedreader software!
[...] speed of your network connection, in addition to the website-specific tips we focused upon in “9 Tips to Make Your Website Load Much Faster.” These suggestions may increase the speed at which you can send and receive email, as well as [...]
[...] speed of your network connection, in addition to the website-specific tips we focused upon in “9 Tips to Make Your Website Load Much Faster.” These suggestions may increase the speed at which you can send and receive email, as well as [...]
[...] speed of your network connection, in addition to the website-specific tips we focused upon in “9 Tips to Make Your Website Load Much Faster.” These suggestions may increase the speed at which you can send and receive email, as well as [...]

Nice article. Also the PHP/HTML/CSS and JavaScript pages can be compressed to load it fast. Read following article for compressing the content using gzip.
http://viralpatel.net/blogs/2009/02/compress-php-css-js-javascript-optimize-website-performance.html