One of the most important considerations of building websites is to make sure they load quickly. Before you begin to optimize your site(s), it´s important to see how well they are functioning, first. One way to do this is to make use of the Make the Web Faster tools, by Google. Two other options you can use are Pingdom and YSlow. Each of these tools will help you to establish a baseline of performance.
After that, you can use these tools to increase page loading times. Based on my experience, here are 7 tips to make your websites load faster:
- Optimize Images: Reduce image sizes using either GIF, PNG-8. orJPEG as the file formats. Make sure the size matches your usage and set the size for each page with the height and width. Do not make use of scaling, especially from larger to smaller images. The image result might look fine on screen but the file size will be the same. To truly take advantage of the smaller dimensions, use an image editing program and scale the image accordingly. The resulting file size will be smaller. It´s also important to experiment with compression for with all of these file formats. At some point you will obtain an acceptable compression with a minimum loss of quality. Experimentation is key.
- Use GZIP compression: If your hosting company uses GZIP compression and deflation these can make a significant difference and speed up your site. It´s possible to reduce file sizes by 70% without losing image quality or video size.
- Avoid CSS Expressions: CSS expressions (introduced in IE5) allow you to set CSS properties dynamically. The down side is that the expressions are evaluated whenever the page is rendered, resized, scrolled and when the user moves the mouse over the page. These ongoing (and frequent) evaluations erode the user experience.
- Add Expires Headers: Due to web page complexity, many HTTP requests could be required to load all of the components. When you use Expires headers those components can be cached and this avoids unnecessary HTTP requests on successive page views. While Expires headers are most commonly associated with images, they can also be used for scripts, style sheets, and Flash.
As you can see, there are many things you can do to improve the performance of your web pages. Some solutions might be simple, while others can be time-intensive. Still, implementing them is important. If your pages don´t load fast enough you run the risk of losing your audience – and no one wants that.