This document discusses various techniques for improving website performance and reducing page load times, such as reducing the number and size of HTTP requests, optimizing files by minifying and compressing code, leveraging browser caching, and using content delivery networks. Some specific recommendations include minimizing unnecessary cookies, combining and compressing JavaScript and CSS files, moving scripts lower on pages, using cache headers, and testing pages on slow connections to identify bottlenecks.
15. Cookie Size Response Time (Delta) 0 bytes 78 ms ( 0 ms ) 500 bytes 79 ms ( +1 ms ) 1000 bytes 94 ms ( +16 ms ) 1500 bytes 109 ms ( +31 ms ) 2000 bytes 125 ms ( +47 ms ) 2500 bytes 141 ms ( +63 ms ) 3000 bytes 156 ms ( +78 ms ) Times are for page loads on DSL (~800 kbps).
47. “ Knowledge rests not upon truth alone, but upon error also.” - Carl G. Jung
Notes de l'éditeur
The user’s perception is more relevant than actual unload-to-onload response time. Definition of "user onload" is undefined or varies from one web page to the next.
User needs to download all components Coming for the first time Force refresh of the site Browser automagically cleared the cache based on settings
User needs to download all components Coming for the first time Force refresh of the site Browser automagically cleared the cache based on settings
Yahoo ran the experiment. Ran against an empty page
Older IE: 6 overall, 2 per host Older FF had 24 as overall and 8 per host Newer FF: 30 overall, 15 per host
Many host names = more DNS lookups, adds delay Consider the effects of CPU thrashing for the client Lookup times vary across ISPs and geographic locations
dynamically combine and cache Combine and minimize before a release
Don't use HTMTL attributes to scale Favicon – keep it around, keep it small
Hash like tag to compare browser cache against the server version Only download if hash has changed Gives more flexibility than last-modified date Great on a single server setup
Typically unique to a server Default behavior in Apache and IIS If hash don't match between server, then browser cache is not used Proper Expires Headers won't help Remove ETags if not being used to its fullest