The document discusses various techniques for improving page speed, including optimizing critical rendering path and first meaningful paint, inlining critical CSS and JS, using async and defer attributes, prioritizing important resources, using server-side processing, font-display, responsive images, HTTP/2, resource hints, and tools like Chrome Developer Tools. The goal is to have 80% of content viewable within the first few seconds by prioritizing what is needed for initial render.
7. @henshaw
Goal is to have 80%
of content viewable
within the first few
seconds
Lorem ipsum dolor sit
amet, consectetur
adipisicing elit, sed do
eiusmod tempor.
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et.
8. @henshaw
Reference: Ilya Grigorik – https://coywolf.io/crp
Critical Rendering Path
Optimized
(progressive)
rendering
Unoptimized
rendering
0.0s 0.5s 1.0s 1.5s
Lorem ipsum
dolor sit amet
Lorem ipsum
dolor sit amet
Lorem ipsum
dolor sit amet
Lorem ipsum dolor sit amet temporLorem ipsum dolor sit amet tempor
Intro copy for
the post
Lorem ipsum dolor sit amet tempor
17. @henshaw
“Getting JS out of the <head> is the first
step! But browsers tend to load JS as
early as possible even with ‘async’.
Only sure way I know is to load non-critical
JS after the ‘load’ event, like defer.js
Ben Morss
Developer Advocate at Google
@benmorss
Reference: Twitter – https://coywolf.io/asyncdefer
18. @henshaw
defer.js waits until the entire document loads
and then loads the JS you specify
Reference: Patrick Sexton – https://coywolf.io/deferjs
19. @henshaw
With or without async or defer.js, always put non-
critical CSS and JS after the page content
22. @henshaw
<link rel="stylesheet" href="style.css" importance="high">
<script type="text/javascript" src="script.js" importance="low">
Reference: W3C Community Group – https://coywolf.io/importance
The importance attribute may be used with
elements including link, img, script, and iframe
23. @henshaw
Google will eventually switch to the latest version
of headless Chrome for crawling
Future proof your site with ‘importance’ while
also making it load faster
28. @henshaw
Reference: W3C Community Group – https://coywolf.io/importance
Use font-display to make text render
immediately while web fonts are still loading