Yottaa Ebook: Beginner'S Guide To Web Performance
Yottaa Ebook: Beginner'S Guide To Web Performance
com
Table of Contents
1s 6s 2s
Total: 9s (avg)
Key
Backend Middle Mile Front-end
• DNS Lookup • Content travels • Browser download
• Server connection through networks • Browser rendering
• Server response to user
.5s 2s 6s
Key
Backend Middle Mile Front-end
• DNS Lookup • Content travels • Browser download
• Server connection through networks • Browser rendering
• Server response to user
Weight
The overall weight of your website -- that is, the
Typical asset weights total number of bytes of all its assets -- factors
JavaScript Overall into its speed. So does the weight of individual
116.6 KB 675 KB assets: a single heavy asset can have a negative
ripple effect on performance.
Image CSS
311.3 KB 17.7 KB Use weight metrics to identify categories of
assets that are too heavy in aggregate, then use
a waterfall chart to zero in on specific assets
within that category that can be fixed or cut.
Asset Count
More assets necessarily mean more weight
Typical asset counts -- that’s reason enough to keep track of asset
Overall JavaScript count. But in addition, each time a visitor’s
47 8 browser makes the trip to your origin server to
fetch an asset for your site, it adds time to the
Image CSS page load. That means no matter how small or
25 3 compressed an asset is, it still contributes to
slowing down your site to some extent. Some
types of assets can be combined so that multiple
assets load with a single request rather than
individually.
Asset Errors
Scan the HTTP status column for any numbers
400 or over. Any time a 400- or 500-level error
occurs it’s a matter of concern since errors can
often have ripple effects on performance, aside
from the failure indicated for that one asset.
Each case begs investigation.
Issue Resolution
Reduce Number of Requests:
• Combine Scripts - Combining or “concatenating” files and scripts is accomplished by
writing a line of code that encompasses information that was previously contained in
two or more lines of code. This is a common practice that can be accomplished by a
developer or using free script-based tools.
• Combine images with sprites - A sprite is a single image that contains the visual
Lots of information of multiple images. A CSS script then positions pieces of the image
Requests where they are supposed to be on the page. This allows the developer to make a
single request for multiple images.
• Combine images etc. with “data: URIs” - A data: URI is a method of including small
images or other bits of data “inline” into an HTML file. That way, instead of loading
as a standalone request, the image will be downloaded along with the HTML file that
includes the basic framework of the page.
Parallel Processing:
• Load 3rd party assets “asynchronously” - Social media widgets, trackers, and other
dynamic assets on your site are often hosted by third parties far and wide, on servers
you have no control over. When those widgets have performance issues, their
problems spill onto your site and drag down performance. Rewriting the script so
that it loads asynchronously can help mitigate blocking behavior so that the rest of
Serialization your site can load around the struggling asset.
• Use domain sharding - Domain sharding is a way to overcome the limitation of
browsers that only allow a handful of open connections with a server at a time. This
has largely been solved by newer editions of browsers that allow for up to 12 open
connections at a time - but not all web users are on updated browsers. To do this you
rewite an asset’s URL to include a made-up alias in the place of “www” that tricks the
browser into thinking it’s a different server.
WPO Checklist:
Entry-level analysis of performance tests: Yahoo Performance Page - Tips, tools, videos, a
10 Performance Problems Identified in 10 Seconds forum and more, all dedicated to WPO
Intermediate-level analysis of performance tests Book of Speed - Stoyan Stefanov shares his
and monitoring data: expertise in this work-in-progress online book
17 Performance Metrics You Should Care About
Velocity Conference Resources - Annual
WPO project management:
conference for the WPO industry
Managing a Web Performance Optimization Project