You have less than 10 seconds to capture the interest of a visitor to your website. If your website takes more than 2 to 4 seconds to load, you have already lost half of your unique visitors. So in addition to having a good web design, it is also important to make sure that website loads fast. (Read our blog on "Characteristics of a good website"). Here are a few things you could do to help your website load faster:
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 instead of having to read each and every single tag all over again. Also it cuts down on long drawn out tags and replaces them with smaller class styles instead.
Use the same script on multiple pages? Switch to an external script. I'm not talking about remotely hosted, I mean loading javascript files from one source instead of adding all that code to each of your pages like this:
That way the browser already has it in it's cache and won't have to read it each time another page loads. This one saves a ton of load time, specially for larger scripts!
Save buttons, typography, and simple graphic elements in GIF or PNG formats which are designed to make these types of images as lightweight as possible. For photographs, consider compressing JPEGs at less than 100% quality if you have many loading simultaneously on a page.
For a free and easy online tool, try:
http://www.converthub.com
For thumbnails or to show a smaller version of an image, resaving the file at the exact size you want to display will save space. If you haveĀ then your file should be resaved as a 200x200px image instead of scaling a 400x400px original.
For a free and easy online tool, try:
http://www.resizeyourimage.com
OK, while this might sound obvious sometimes the hardest thing about creating a website is not using every fancy trick that you know. Images, flash and sometimes even sound files are very impressive.. but do you really need to showcase all your talents on one page?
Embedded sound files are something many people just find annoying anyway. You'd be surprised how many are surfing at work ;-). The last thing anyone wants is a loud music or sounds announcing to their boss that they're surfing. Also not many appreciate it when they have to wait for a flash to end before they can access your website. Stand back and take a critical look at your website, you may see a few special effects that can be let go of for the sake of faster load time.
By splitting up long pages into multiple pages you not only make the content show up faster but many people that see a very long scroll bar give up. Remember, people's attention spans are often shorter than a grasshoppers (OK, not literally, but you get my point) since so much information is available at our fingertips. Try breaking it up into more readable lengths.
Many code editors add uneccessary whitespace or blank lines to your documents. Removing this unused space will make your files smaller and load faster. Be sure to check at the bottom of your code where whitespace may have been pushed down from a template file.
There are several software out there that allows you to convert an image or Word document into a website. If these software could do what a programmer could do, then the job of web developers would have been long extinct. The problem is these software add an unbelievable amount of complicated and unwanted code that slows down the website considerably. Even content pasted from Microsoft word can add unnecessary code. Clean up the unwanted code and see your website load faster.