Some Tips to Improve Your Web Sites Performance

We all wish quickly loaded web sites. But we sometimes miss out or do not know the easy implementations that can affect performance. There are realy great articles about performance. Once is the yahoo’s famous performance rules (http://developer.yahoo.com/performance/rules.html) as we all know. And another good resource is the google’s “Let’s make the web faster” project’s speed articles. (http://code.google.com/speed/articles) Definately you should read more about performance subject.  But this article could be a fast start.

Add Expires Header

The biggest enemy of the performance is unnecessary HTTP requests. If an image is already sent to the client or a JavaScript file, mustn’t be requested again. If we add expires header to unchanging files, browser will not request the same file again. We gain performance and also we will save bandwidth. These files like logo images, base JavaScript files that will not change for the life of the site. Give a hundred years :) forward expire time to them.

The thing you will do is really simple if your server is apache. Add this code to your .htaccess file.

<FilesMatch “\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”>
Header set Expires “Thu, 15 Apr 2099 20:00:00 GMT”
</FilesMatch>

Read more apache speed tips. (http://www.askapache.com/htaccess/apache-speed-expires.html)

Compress your JavaScript

We realy use very much JavaScript code. And we like it don’t we? :) I use javascripts to make my page more user friendly. Sometimes our scripts can be untidy. Keep them clean and compressed. Because every chacter is a byte, even it is a space. There are online tools to compress javascripts. One of them is javascriptcompressor.com.

Before I finish this paragraph I would like to add another advice. Put your JavaScript’s just before body tag.

This is a good practice because by doing this, browser first loads your html and images, then loads JavaScripts. And so your visitor sees the page earlier. JavaScript’s are not the first items that needed to show your design.

Compress your CSS

Every chacter is a byte, even it is a space. So CSS files should aslo be compressed. My favorite online tool is csscompressor.com.

Use page speed plugin

Page Speed is a plugin which is integrated in firebug. It analyses the page and advises you. The best thing page speed does is compressing images. Under the optimize images tab you will see all the images that need compression and the compressed images links. Check this link (http://code.google.com/intl/tr-TR/speed/page-speed/) for more about page speed.

Be Sociable, Share!

    Category: Something - Comments Off on Some Tips to Improve Your Web Sites Performance

    Comments are closed.

    Back to top