10 Tips to Speed Up Your WebSite Loading Time

1. Use of External Scripts :
If you use the same script on multiple pages of your site then use of external script can help reduce loading time. ;) I don’t mean to host them remotely. I mean to load Javascript from the same source. Example :

<script type="text/javascript" src="yourscript.js"></script>

This way the browser caches the script and it won’t have to read it again and again.

2. Reduce HTTP requests :
Loading each item on your website, has an average round-trip latency of 0.2 seconds. So if your site is loading 10 items, regardless of whether they are stylesheets, images or scripts, that equates to 2 seconds in latency alone. If you have a portion on your site with many images within it, such as your footer, you can reduce the number of HTTP requests with image maps. If you are using K2, you can get rid on one extra HTTP request by using one stylesheet, style.css, and no schemes.

3. Don’t Rely on other WebSites :
Relying on other sites can also decrease site loading time. If you have several component on your site loading from other sites then it can slow down page loading speed because the other server might be receiving too many HTTP requests.

4. Optimize your Images :
Always use the “Save for the web” feature included on image editing software(such as PhotoShop). Images represent the heavier load on virtually any website so make sure you are optimizing them. Alternatively you can also turn to an online image optimizer.

5. Remove WhiteSpace :
Whitespace is the spaces between your coding, removing the unneeded tabs and spaces can help a lot. Doing this will take a lot of extra bytes off the total size of your page and will speed up load time quite a bit.

6. Use of CSS and CSS Optimization :
CSS can greatly improve your web sites load time. With your styles in an external .css file, the browser can cache all the formatting and stylizing for your pages and it won’t have it read it again and again. Make sure you aggregate and clean your CSS. You can use CleanCSS to merge similar selectors, remove useless properties and remove the whitespace from your code.

7. When a user opens a link on the form “http://www.ddomains.com/contact” the server will need to figure what kind of file or page is contained on that address. If you include a slash (/) at the end of the link the server will already know that this is a directory page, reducing the load time of the site.

8. Which Image Format to use? :
You should use GIF or PNG image format. The GIF format should be used with flat-color images like logos or buttons. PNG works very similar to GIF but it supports more colors. JPEG format is suitable for photographs or true-color images.

9. Use of Height and Width tags :
Height and Width tags are also important for your images(never forget to add them). Those tags will make sure that the browser knows the size of the image before loading it. The result is that it will reserve a spot for the images while loading the rest of the page, speeding up the whole process.

10. Use of Caching :
Use WP-Cache plug-in if you are using a WordPress blog.
*Set the browser’s cache expiration. This can be easily done using PHP in order to send some headers. For example, let’s take a js file called scripts.js. In order to use caching we will create a new file called scripts.js.php and add the following code at the very beginning of it which will set the cache to expire in 3 days :

header("Content-type: text/javascript; charset: UTF-8");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 3;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";

And last but not the least, host your site on a fast server or buy a dedicated server for hosting your sites(like i have bought). ;)

6 thoughts on “10 Tips to Speed Up Your WebSite Loading Time

  1. Hi, I came across this post while searching for help with JavaScript. I have recently changed browsers from Opera to Firefox 3.2. After the change I seem to have a problem with loading JavaScript. Every time I go on a site that needs Javascript, the site doesn't load and I get a "runtime error javascript.JSException: Unknown name". I can't seem to find out how to fix it. Any help is greatly appreciated! Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.