Improve web page download speed
The longer that web pages take to download, the more users will tire of waiting and will move on to the next site.
Contents |
[edit]
Download speed introduction
These are factors in web page download speed:
- Server location and capacity
- Page coding and page size
- Image size, specifications, and frequency
[edit]
Download speed and server location and capacity
- Server location: if the server is in a US datacenter and most of your site visitors are in Australia, for example, your web pages will download more slowly for that audience than if your site were on a server in Australia. When download time counts, it's better to have your site located on a server in the same part of the world as your target audience.
- Server capacity: if your site is on a server with too many other active websites, your pages may load more slowly.
[edit]
Download speed and HTML and CSS
- Use valid HTML. Errors in the HTML can cause pages to load more slowly.
- Eliminate unnecessary HTML. Some WYSIWYG HTML editors tend to clutter up the page with unnecessary coding. If you use a WYSIWYG HTML editor, clean up the code afterwards by hand. Also, if you have any coding that isn't used for the page any more, remove it.
- Use CSS with an external stylesheet. CSS stylesheets are downloaded once instead of having all the formatting specifications download with each page.
- Use CSS instead of tables for layout when possible and use tables only for data. CSS reduces the amount of coding needed considerably compared to using tables for layout.
- If you need to use tables:
- Avoid nesting tables in other tables. Browsers can't display tables until they've come to the end of the table code, so nested tables can't be displayed until browsers have reached the end of the code for the table that encloses other tables.
- Specify table height and width.
- Specify the width of each table column.
- Use CSS for presentation attributes. For example, instead of specifying valign="top" for each row within the HTML, specify vertical-align:top for tables on your external style sheet, and all your tables will have the desired vertical alignment with just a few bytes of code.
[edit]
Download speed and images
- Don't use more images than you need. Most web pages look fine with only a few images.
- Use the same image on more than one page. Doing this speeds up download time because each image downloads only once.
- Compress images to reduce their file size.
- Specify image height and width for each image. When you do this, the browser knows how much space each image will need and can download the rest of page before the images are downloaded.
- Use the right size for each image. For example, if your image is going to display as 400px by 260px, make sure that the image itself is exactly that size. A larger image will take longer to download.
[edit]
See also
Share / Bookmark this page:
Thanks to this contributor for creating this article for our web hosting community:
Web Hosting Wiki article text shared under a Creative Commons License.


