Friday, August 20, 2010

6 Different Ways To Decrease Your Page Load Time
On a 56k connection a Webpage should load within 8 seconds. The following methods are all ways you can speed up your page load time.



1. Webpages that use JavaScript are programmed with the script at the top of the document. The content cannot be seen until the JavaScript has fully loaded. Put any JavaScript at the bottom of the document and it will load after the main content has finished, thus diminishing the loading time of the page. The page will still be loading when it is viewable within the browser but the user will be unaware of this.



2. Loading in external code such as style sheets or JavaScript files can also increase a page's load time. If you include the external files within the main html file it makes the code less readable but it also decreases the load time. When you've got your webpage working correctly, take some time to copy paste external code into the main html file.



3. There are three main formats of image that are used for webpages. These include: Portable Network Graphics (png), Joint Photographic Experts Group (JPEG) and Graphics Interchange Format (gif). Deciding on a format that both retains the quality of the graphic and lessens the file size is very important. A gif type image is the smallest format so if your graphics only contain a few colours then this would be the best choice. JPEGs can vary in quality and consequently in file size also. You should target the smallest size that doesn't reduce the quality of the graphic. PNGs can provide graphics with transparent backgrounds but have a larger file size than the two previous types. Bitmaps (bmp) are another familiar image file type but take up a large quantity of memory. These should be avoided altogether for web use to guarantee speedy page load times.





4. A minimal use of images, in particular animated gifs will also lessen page load time. An animated gif is made up of numerous different images and will have a substantially bigger file size than a regular graphic. The lower the file size of the externally loaded image, the quicker the page will load. The amount of images being loaded is also worth noting as it also effects page load time.



5. Animated gifs are quickly being replaced by swf files or Flash animations. However they're file size is significantly bigger than that of animated gifs. They should be used in moderation on a page and only where necessary. It is worth taking into consideration using an animated gif instead of a swf if your animation is short and doesn't require any user interaction. However if your animation requires sound a gif won't be up to scratch. The use of swfs will also require extra code to check if the user has a flash player installed. This requires further coding and is another reason to only use Flash files where necessary.



6. It is advisable to combine separate images where you can to lessen page load time. Two separate graphics will have a greater overall file size than one. The more images the page needs to load the more http requests it needs to carry out and this also increases loading time.
in Internet



What now? Once you have read this article, give it a rating.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home