Optimizing Your Web Page Speed - Minimize HTTP Requests
(Page 2 of 4 )
Each object on a web page requires a request to the server. If you have 20 images on the web page, then each image will require a separate request, totaling 20 altogether.
When the number of objects is high (10+), object requests dominate page download times. By minimizing the number of objects, you can minimize the number of HTTP requests, thus reducing page download time.
Follow those steps:
Convert graphic-based text to CSS. Graphic-based text in headers, and other page elements, requires the image file to be larger than it has to be (since too much compression reduces quality). Use CSS-style headers to achieve the same or a similar look. The trade off is one more HTTP request for a smaller image size and some CSS tweaking.
Combine external CSS and JavaScript files. Sometimes developers create style sheets and import them to the pages as required. This approach creates additional HTTP requests. By combining files, you will reduce download time by 1 HTTP request. You can also combine CSS and JavaScript files together by telling the server to parse CSS files for PHP commands. Search the web for more information.
Get rid of frames. Frames are extremely evil, since bots have trouble identifying web pages. They're just as evil as Flash in terms of SEO.
Convert JavaScript to CSS
JavaScript is used widely for a variety of purposes. The problem with JavaScript is that search engines do not read it (though technology already exists to even fill out JavaScript forms), and it requires a separate external file, which increases page download time.
Use CSS to perform commands similar to JavaScript: hover, dropdown, hide/show etc. You have to be pretty good with both languages, though, or instruct your web person to do it.
After replacing JavaScript with as much CSS as possible, you can optimize the remaining code to minimize file size. There are a number of free tools on the web which will help reduce script file size by eliminating white space and using abbreviated object, variable and function names.
You can do the same with CSS:
You can also rewrite the same code to achieve a smaller file size, though this requires more time/money.
Next: Optimize Images and Multimedia >>
More Search Optimization Articles
More By Ivan Strouchliak