How To Optimize Your Website For Greater Speed

by Mahesh Kukreja · 4 comments

in Webmaster Tutorials


The Google Search Quality Team announced that website speed is a ranking factor in April 2010. When it comes to optimizing a website for speed, the shortcuts, hacks and tricks are plenty. To get the most from a site, using the following five quality tips together will indefinitely result in a measurable performance boost. From image compression, HTML comments, Ruby on Rails web hosting options, script tags, URLs and more, this article will discuss how these five topics work together to provide the fastest speed for website readers and browsers.

Optimize Website Speed

Image optimization

Optimized image files reduce page size, in some cases by as much as 50%. When images are set to display at 320×320, use images scaled to that size, not larger ones. Removing a few images altogether boosts speed also. Each image used should have its dpi resolution lowered if possible. Images necessary to a site can be optimized and compressed further by reducing PNGs, stripping JPEG metadata, and stripping excessive pixels across frames in an animated GIF. The free online smush.it lossless compression tool does all the work. Simply paste links to your images (each image 1MB or less), and download the compressed results.

Ruby on Rails (RoR)

Ruby on Rails, a web application framework heavily based on Ruby programming language, hit the ground running, introducing a performance boosting bytecode VM. If you need more than a handful of editing tools, like fast JavaScript effects and dynamically draggable elements, RoR is a choice worth considering. The code adheres to convention, and is human-readable. DreamHost is a popular RoR hosting provider. According to a comparison at RailsHosting.org, DreamHost boasts the best uptime, Rails apps run quickly with FastCGI, and their professional staff seem to genuinely enjoy what they do.

HTML comments and script tags

Two quick tips are removing HTML comments altogether, and placing script tags at the end of a page. These two steps are not for everyone. Some choose to keep their code commented, which is fine; but removing comments equals a smaller page, further reducing load times. Why would someone place script tags at the end of a page? Downloading scripts halts pipelining. Positioning tags at the end of the page ensures other page elements load first.

Communicating URLs to the server

Terminate with forward slashes any URLs linking to directories. Instead of letting the server take time to solve for the unknown, this tells the server it is loading a directory. This does not result in a dramatic increase, but it is constructive to use every millisecond of speed available.

Reducing real and perceived load times

Websites can increase speed by using a content delivery network (CDN) that is nearer the website’s visitors. CDNs use the bandwidth of all client computers in the network, eliminating the bottlenecks experienced when visitors try to access images, objects, or files. CDNs are free, commercial, or commercial P2P.

It behooves us to not only boost search rank, but to also greet visitors with fast-loading pages. The goal is a reduction in the number of pages that must load. Where possible, reductions should be made to JavaScript and CSS files. Loaded near the end of the page, JavaScript allows a visitor’s browser to pipeline the rest of the page elements.

JavaScript and CSS files can be combined, comments and whitespace excised, and several HTTP requests merged into one. Free online tools such as the W3 Total Cache make this process a cinch. The WordPress description of the W3 Total Cache states that one benefit of using the tool is a 10x improvement in overall site performance, a very noticeable speed increase.

A quick recap: Optimize and compress images as much as possible, remove HTML comments, and position scripts at the end of a page. Use a RoR host if appropriate, tell your server when it is loading a URL that links to a directory, and get those HTTP requests under control. Site speed is a necessary part of good visitor experience, and the benefits far outweigh the minimal time invested to implement these strategies.

Subscribe to our mailing list

* indicates required

{ 4 comments… read them below or add one }

Balaji P M | MS Geek Boy May 14, 2011 at 2:46 pm

Great Tips 🙂

Thanks for sharing

Reply

Jens P. Berget May 16, 2011 at 5:55 pm

I have given this much thought, and I’m going to do something about my slow loading time. And what I have been thinking about is installing W3 Total Cache, but it seems to be fairly complex solution, where I’ll have to pay a monthly fee to Amazon as well?

– Jens

Reply

Admin May 16, 2011 at 6:09 pm

There are a lot of tutorials if you search on Google which guide you to install the plugin. The procedure is lengthy and complex for non computer savvy people. But you can find your way around easily.

Reply

Paid Critique June 23, 2011 at 2:19 pm

for example I used AJAX as my language in making a site does it affect the SERP?

Reply

Leave a Comment

Previous post:

Next post: