Steve Souders: "High Performance Web Sites: 14 Rules for Faster
This is a fascinating and usable book. The advice is presented
clearly and simply and can be applied, and doesn't have to change your
site much. Reading this before you develop your site means you may do
Rule 1: Reduce #HTTP requests.
concatenate style sheets and JS files.
Rule 2: Use a content delivery network
split static content to edge servers
Rule 3: Add an Expires header
for all static content
- Start the Internet Information Services administration tool
- Select web site(s) or directory
- Open Properties
- Select HTTP headers
- Select "Enable content expiration"
Rule 4: Use gzip components
90% of browsers support compression
70% compression on html documents
(web server configuration)
AddOutputFilterByType DEFLATE text/html text/plain text/xml
Rule 5 Put style sheets at the top
All style sheets need to downloaded before rendering starts.
In IE use LINK not @import
Rule 6: Move scripts to the bottom.
scripts block rendering of everything below them.
script defer is NOT a solution
Rule 7: Avoid CSS expressions
problems are expressions are evaluated many times (e,g, mouse moves)
One time expressions OK if can code it.
Or add an event handler and tie to that. (Saves many executions).
Rule 8: Make JS and CSS external
inline: HTML document is bigger, but
external: more HTTP requests, but cached variables
rule 9: reduce DNS lookups
these block parallel downloads. There are tradeoffs here, because you
can split your web site across multiple domains to allow more
parallelism in downloading content. DNS entry lifetimes time out,
though there are caches of these in the browser, OS, IS DNS etc. DNS
lookups take time and this decreases performance. Also use of
Remove white space and comments
Also obfuscate (minify is safer)
Rule 11:avoid redirects
Examine server logs for 301 & 302 status codes. Apart from
intentional redirects e.g.
simple cases such as a missing "/" on URL dir a directory.
- <meta http-equiv="refresh" content="0; url=...
Rule 12: Remove duplicate scripts
cause extra HTTP requests
Rule 13: Configure ETags
But be careful of incompatibility between web server instances. This is
particularly a problem where there are multiple server (e.g. cluster)
serving up the same content.
(Some use inode, which may differ between servers).
(Or just turn off)
Rule 14: Make AJAX cacheable
a personalized response should be cacheable.
(i.e. still use expires)
Or use different page name (e.g. address book page URL may contain
So if had been modified, then link is different and new copy
High Performance Web Sites : Essential Knowledge for Front-End
By Steve Souders
First Edition September 2007
Pages: 168 (More details)
ISBN 10: 0-596-52930-9
ISBN 13: 9780596529307
Fasterfox for measuring and
improving Firefox performance.
YSlow for Firebug
IBM Page Detailer
is a graphical tool that enables Web site developers and editors to
rapidly and accurately assess performance from the client's perspective.
New book http://oreilly.com/catalog/9780596522308/
|Even Faster Web Sites
||Michael J. Ross
||Advanced techniques for improving website