Sunday, 11 April 2010

How to speed up your load times Part 1

If your website loads slow, you not only will lose visitors but even search engine bots hate it. so its very important that you make sure you website loads faster.

1) Use CSS

Use tableless designs if you can, if you cannot atleast use CSS. CSS can greatly reduce web sites load time.  CSS file will have all your styling and formation and when caches all of it, it does not have to look for styling in each and every tag in the html. This helps you to increase the speed of your website.

2) Use External Scripts (Javascript)

There are times where you want to run one single script multiple times on different pages. Instead of using that script on each and every page , use it as external scripts. This way browser saves it in the cache and does not have to read again and again.

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

3) Avoid Nested Tables

Avoid tables if you can and go for tableless design. But if you have to see tables, atleast make sure you don't have them nested. The nested tables slow browsers down considerably. So avoid it altogether

4)  Avoid Full Page Tables for Faster Rendering

If you use tables, try avoiding the entire page be one big table. As browser has to read entire thing and then show it. So instead of one big table, use small tables but avoid nesting. This way visitors have something to read when rest of your page loads.

5) Remove Anything that you don't need

There are times we have some code that we don't need in the html pages. If you really don't need it, remove it. There are times you use embedded sound files, for users it annoying, so remove it unless you really really need it. Sometimes people have flash, sound, images etc on one single page and it really slows down the webpage. Instead think how you can create separate pages to showcase your website.

Read How to speed load times Part 2

No comments:

Post a comment