28 May 2009 ~ 5 Comments

One-Cent Tips to Increase Site Performance


Foreword

Experience a spike in usage on your hosting server? Well, my old friend does as he highlighted in his recent post about his decision in switching his theme to a simple one: one that he presumed doesn’t chew up a lot of resources from his shared hosting server ;) . So here’s just my little thought or sharing tips on how to increase your web site or blog site performance for better user experience.

My One Cent

There are few factors in order to achieve this, namely

Server Reliability

Personally I think your hosting server reliability is the foremost element to increase site performance, namely server up-time and connectivity. Essentially without a reliable hosting server, the tips below will not have much impact or in other words pretty useless. Well I highly welcome your input on list of reliable hosting servers to use. ;)

Small File Size

Reduce as much as possible the size of the files used for your site: HTML, JavaScript, CSS, and image files in order to save network bandwidth. As a result, your page loads faster.

For HTML and JavaScript

I guess the answer is simple: eliminate white characters (spaces and new line characters) present in the file. One drawback of course, it will be difficult to debug your HTML or JavaScript. Well you can easily solve this by maintaining your friendly JavaScript for your debug purpose and dedicate a “compressed” one for production.

For CSS

The similar approach as the former. However I found some CSS can be quite bloated or in other words huge in size for some reason. And it is more likely that there are a lot of redundancies. If the former case is true, try CSS Framework as your foundation/start in creating your style-sheet.

For Image file

Choose the best compression format (GIF, JPG, or PNG) that is suitable for your images and its purpose. Check this post to find out more about the advantage and disadvantage of the individual format.

If you use a WordPress blog, you may want to install a plug-in called WP Minify but be warned of its drawback which I’m going to explain to you later.

Reduce Round-trip

Wonder what round trip means? Sorry but I couldn’t find a best definition for the term from google, but I found a closest one from wiki and answer.com. answer.com cited that a round trip is

A trip from one place to another and back, usually over the same route.

In Web, number of round trips is calculated based on the number of requests made by a browser before it is complete: one primary request for HTML files and subsequent requests for your JavaScript, CSS, and image files if needed. The solution is easy: use just one file for respective file type. :P (How’s that possible?) Na… just kidding. :)

For JavaScript and CSS

If you have more than one files, merge them into just one file.

For Images

One way is to piece those images together and create one bigger image file and use Cascading Style Sheet (CSS) to show the respective image to the respective space on your page. CSS background tells you how to achieve this.

Avoid Dynamic pages

Nowadays dynamic pages are inevitable as web audiences are looking for more interactive web sites which serve fresh sets of information each day or even every hour. I guess here I’m not asking you to edit your HTML files for each of your post (for your blog) and I think those were the old days where page scripting had not been invented yet. :P

Why do I say that? because dynamic pages may consume a lot of CPU power which may cause a hiccup on your hosting server. And worse if your site resides on a shared server, other sites may have to wait (or sacrifice) for your site to complete its computation.

Caching is a way to help reduce CPU consumption. Caching is a process of creating a duplication or copy of  your dynamic pages to be stored elsewhere, thus subsequent request of the same dynamic pages can be fetched from existing cache in order to prevent computation redundancy. For WordPress user, try WP Super Cache plug-in.

Just a note, avoid dynamic compression of your web files to save your network bandwidth as this has its drawback: yields a high CPU usage.

Lastword?

Well, that’s all for the tips. Mike, if you’re reading this, I hope this can be your humble guidance in finding the best theme and plug-ins for your blog. :P

Ciao! ;)

5 Responses to “One-Cent Tips to Increase Site Performance”

  1. Michael Aulia 28 May 2009 at 7:55 am Permalink

    Great additional of tips :D I found out that using a simpler theme hasn’t made my hosting happy yet but as you said on the post, those “little”
    changes have effects on the server so pick your theme and plug-ins wisely

  2. Jonathan 28 May 2009 at 10:54 am Permalink

    second to that.. ;)

  3. San Francisco SEO 29 June 2009 at 3:12 am Permalink

    Great tips and I find very useful.. Thanks for sharing and more power.

    -richard


Leave a Reply

Spam protection by WP Captcha-Free