"We live only to discover beauty, all else is a form of waiting. Khalil Gibran", if you agree with this saying, then you are well aware of what it mean to minimize wait for your web audiences.Building an HTML page, adding images, CSS and JS has become piece of cake over last few years, but delivering these rich-contents with a Performance to client browser is still a daunting task. This narrow down check list will help you to review your web site to minimize download time.
Note: This article describes only Front-End engineering issues, No Programming/CGI scripting/Data Structure/Database/Multimedia optimization techniques are discussed in this article.
Last year while working on WNetwork.com and Treehousetv.com, I decided to write down experiences I had in my last few years in web development as well as learning from many sources and trying to make a habit of applying them. I have compiled these notes with a hope that every reader will get at least one or two ideas from them.
This section describes about what happens in between, when user types WWW address and see complete web page before his/her eyes. This would give us an idea about Where time is spend and how to minimize it.
Please note: Above figure may seem complex but DNS look up normally takes less than a second, approx.: 100ms to 900ms. The detail is given to show a complete process.
Now let's get to the point:
{URL}
src={URL}
href={URL}
url({URL})
background-image
background-position
<html> <head> <title>Cache - Example</title> <meta http-equiv="Expires" content="Sat, 16 Jul 2016 18:45:00 GMT"> ..... </head> <body> ....... </body> </html> <html>
mod_cache
mode_file_cache
<html> <head> <title>No Cache - Example</title> <meta http-equiv="CACHE-CONTROL" content="NO-CACHE"> ..... </head> <body> ....... </body> </html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>DTD - Example</title> ..... </head> <body> ....... </body> </html>
document.write();
table
div
<table>
</table>
<div>
WIDTH
HEIGHT
IMG
width
table-layout:fixed
COLGROUP
Width
Height
HEAD
document.write()
<html> <head> <title>CSS and JS defer - Example</title> ..... <link rel="stylesheet" type="text/css" href="rich-layout.css" media="screen"> <link rel="stylesheet" type="text/css" href="simple-layout.css" media="print"> <script type="text/vbscript" src="fval1.0.2.js" defer></script> </head> <body> ....... </body> </html>
Accept-Encoding:gzip,deflate
Content-Encoding:gzip
mod_gzip
mod_deflate
$import()
<base href="http://www.domainname.com">
.HTML..........Simplify design. .HEAD .LINK......CSS file(s) required for page appearance. .SCRIPT....JS functions required during page load. .BODY ...........Small chunks (DIVs, TABLEs), minimize images. .SCRIPT....JS functions required after page load, validation etc. .PRELOAD...If required, Pre load any images here.
Some experts claim, If your home page does not load within 8 seconds, as much as a third of your site visitors will get frustrated and leave. I hope that these guidelines and examples would help to quickly understand and apply improvements to your web development.
Lasted Updated: Monday, May 26, 2008.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
General News Suggestion Question Bug Answer Joke Rant Admin