Slide 1

Slide 1 text

Wed 29 Oct 1969 ~ ucla$ ░

Slide 2

Slide 2 text

Wed 29 Oct 1969 ~ ucla$ ░

Slide 3

Slide 3 text

Wed 29 Oct 1969 ~ ucla$ lo ░ gin

Slide 4

Slide 4 text

Wed 29 Oct 1969 ~ ucla$ lo ░ ░

Slide 5

Slide 5 text

Performance: HTTP/2 in a 1.5 world Peter Wilson • peterwilson.cc • @pwcc

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Linnaea Mallette

Slide 8

Slide 8 text

Today

Slide 9

Slide 9 text

Bytes on the page

Slide 10

Slide 10 text

Total page size (MB) Nov 2011 - March 2016 0.5 1.0 1.5 2.0 2.5 1 Nov '11 15 May '12 1 Dec '12 15 Jun '13 1 Jan '14 15 Jul '14 1 Feb '15 15 Aug '15 1 Mar '16 httparchive.org/trends.php, March 2016

Slide 11

Slide 11 text

Total page size Percent of Nov 2011 50% 100% 150% 200% 250% 300% 1 Nov '11 15 May '12 1 Dec '12 15 Jun '13 1 Jan '14 15 Jul '14 1 Feb '15 15 Aug '15 1 Mar '16 httparchive.org/trends.php, March 2016

Slide 12

Slide 12 text

Assets per page Nov 2011 - March 2016 20 40 60 80 100 120 1 Nov '11 15 May '12 1 Dec '12 15 Jun '13 1 Jan '14 15 Jul '14 1 Feb '15 15 Aug '15 1 Mar '16 httparchive.org/trends.php, March 2016

Slide 13

Slide 13 text

Webfonts Multiple of Nov 2011 (bytes) 2 4 6 8 10 12 14 16 18 20 1 Nov '11 15 May '12 1 Dec '12 15 Jun '13 1 Jan '14 15 Jul '14 1 Feb '15 15 Aug '15 1 Mar '16 httparchive.org/trends.php, March 2016

Slide 14

Slide 14 text

Load time httparchive.org/trends.php, March 2016

Slide 15

Slide 15 text

Load time Start render: 4.2 seconds

Slide 16

Slide 16 text

Load time Visually complete: 12.7 seconds

Slide 17

Slide 17 text

Load time Document complete: 15.23 sec

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

Money

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

Walmart conversion rate slideshare.net/devonauerswald/walmart-pagespeedslide 0 - 1 1 - 2 2 - 3 3 - 4 4 - 5 5 - 6 6 - 7 7 - 8 8 - 9 9 - 10 10 - 11 11 - 12 12 - 13 13 - 14 14 - 15 15+

Slide 23

Slide 23 text

Shopzilla: 12% revenue increase globaldots.com/how-website-speed-affects-conversion-rates

Slide 24

Slide 24 text

Yahoo!: 9% traffic increase globaldots.com/how-website-speed-affects-conversion-rates

Slide 25

Slide 25 text

[A] slowdown of one second could cost [Amazon] $1.6 billion in sales pwcc.cc/respond/1.6billion

Slide 26

Slide 26 text

[A] slowdown of one second could cost [Amazon] $1.6 billion in sales Esther Vargas (CC) - flic.kr/p/fstSrg

Slide 27

Slide 27 text

Each 100ms delay costs 1% of sales pwcc.cc/respond/amazon (ppt)

Slide 28

Slide 28 text

Measure a starting point

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

WebPageTest - webpagetest.org

Slide 32

Slide 32 text

WebPageTest - webpagetest.org

Slide 33

Slide 33 text

Key metrics Document Complete Fully Loaded Load Time First Byte Start Render Speed Index DOM Elements Time Requests Bytes In Time Requests Bytes In 3.770s 0.771s 1.789s 1834 397 3.770s 27 635 KB 4.072s 33 661 KB WebPageTest - webpagetest.org

Slide 34

Slide 34 text

Timeline view

Slide 35

Slide 35 text

Comparison timelines Additional blocking request in HTML Header Timed using WebPageTest - pwcc.cc/respond/blocking 0.5s 1.0s 1.5s 2.0s 0% 0% 0% 100% 0% 86% 100% Blocked Unblocked

Slide 36

Slide 36 text

Comparison timelines Additional blocking request in HTML Header Timed using WebPageTest - pwcc.cc/respond/blocking 0.5s 1.0s 1.5s 2.0s 0% 0% 0% 100% 0% 86% 100% Blocked Unblocked

Slide 37

Slide 37 text

Comparison timelines Additional blocking request in HTML Header Timed using WebPageTest - pwcc.cc/respond/blocking 0.5s 1.0s 1.5s 2.0s 0% 0% 0% 100% 0% 86% 100% Blocked Unblocked

Slide 38

Slide 38 text

Comparison timelines Additional blocking request in HTML Header Timed using WebPageTest - pwcc.cc/respond/blocking 0.5s 1.0s 1.5s 2.0s 0% 0% 0% 100% 0% 86% 100% Blocked Unblocked

Slide 39

Slide 39 text

Speed index Document Complete Fully Loaded Load Time First Byte Start Render Speed Index DOM Elements Time Requests Bytes In Time Requests Bytes In 3.770s 0.771s 1.789s 1834 397 3.770s 27 635 KB 4.072s 33 661 KB WebPageTest - webpagetest.org

Slide 40

Slide 40 text

53 / 100 Our PageSpeed score is you won’t believe how
 much it’s costing

Slide 41

Slide 41 text

World Super Cars at English Wikipedia (CC) • VIA Gallery (CC) - flic.kr/p/5QTEFc

Slide 42

Slide 42 text

~$

Slide 43

Slide 43 text

~$ nslookup example.com

Slide 44

Slide 44 text

~$ nslookup example.com Non-authoritative answer: Name:example.com Address: 117.53.163.91 ~$

Slide 45

Slide 45 text

~$ telnet 117.53.163.91 80 Connected to 117.53.163.91.

Slide 46

Slide 46 text

~$ telnet 117.53.163.91 80 Connected to 117.53.163.91. GET / HTTP/1.1 Host: example.com

Slide 47

Slide 47 text

~$ telnet 117.53.163.91 80 Connected to 117.53.163.91. GET / HTTP/1.1 Host: example.com nextSlideOnWindowFocus:"off", disableFocusListener:false, } }); } }); /*ready*/ /* <![CDATA[ */ var scriptParams = {"google_search_engine_id":"017877086915232438708:-pvqphefyyw"}; /* ]]> */ /* <![CDATA[ */ var qpprFrontData = {"linkData":{"http:\/\/example.com\/?p=3925":[0,1,"http:\/\/example.com\/?p=3893"],"http:\/\/example.com\/blog\/2014\/10\/sponsorship-directory\/":[0,1,""],"http:\/\/example.com\/?p=4437":[0,1,"http:\/\/example.com\/centrestage"],"http:\/\/example.com\/? p=4522":[0,1,"http:\/\/example.com\/blog\/vacancy\/2015-radiothon-fundraising-events-coordinator\/"],"http:\/\/example.com\/blog\/2015\/05\/remember-joy-join\/":[0,1,""],"http:\/\/example.com\/blog\/2015\/06\/taste-of-radio\/":[0,1,"http:\/\/example.com\/training\/taste-of-radio \/"],"http:\/\/example.com\/blog\/2015\/06\/new-music-to-weekdays\/":[0,1,"http:\/\/example.com\/music"],"http:\/\/example.com\/?p=4916":[0,1,"http:\/\/example.com\/rebel-heart-tour\/"],"http:\/\/example.com\/blog\/2015\/07\/centre-stage-the-winners\/":[0,1,"http:\/\/example.com\/ centrestage"],"http:\/\/example.com\/blog\/2015\/08\/latest-podcasts\/":[0,1,"http:\/\/example.com\/podcasts"],"http:\/\/example.com\/?p=5079":[0,1,"https:\/\/www.surveymonkey.com\/r\/joy949survey"],"http:\/\/example.com\/blog\/2015\/12\/volunteer-vacancies\/":[0,1,"http:\/\/ example.com\/vacancies-category\/volunteer\/"],"http:\/\/example.com\/blog\/2015\/11\/94days-of-summer-is-coming\/":[0,1,""],"http:\/\/example.com\/?p=5282":[0,1,"https:\/\/www.outix.net\/booktickets\/event\/JOYFundraiserDanish"],"http:\/\/example.com\/blog\/2016\/02\/new-taste- radio-dates\/":[0,1,"http:\/\/example.com\/training\/taste-of-radio\/"]},"siteURL":"http:\/\/example.com","siteURLq":"http:\/\/example.com"}; /* ]]> */ /* <![CDATA[ */ var zoomOptions = []; /* ]]> */ /* <![CDATA[ */ var JQLBSettings = {"showTitle":"1","showCaption":"1","showNumbers":"1","fitToScreen":"1","resizeSpeed":"400","showDownload":"0","navbarOnTop":"0","marginSize":"20","slideshowSpeed":"4000","prevLinkTitle":"previous image","nextLinkTitle":"next image","closeTitle":"close image gallery","image":"Image ","of":" of ","download":"Download","pause":"(pause slideshow)","play":"(play slideshow)"}; /* ]]> */ /* <![CDATA[ */ var mejsL10n = {"language":"en-US","strings":{"Close":"Close","Fullscreen":"Fullscreen","Download File":"Download File","Download Video":"Download Video","Play\/Pause":"Play\/Pause","Mute Toggle":"Mute Toggle","None":"None","Turn off Fullscreen":"Turn off Fullscreen","Go Fullscreen":"Go Fullscreen","Unmute":"Unmute","Mute":"Mute","Captions\/Subtitles":"Captions\/Subtitles"}}; var _wpmejsSettings = {"pluginPath":"\/wp-includes\/js\/mediaelement\/"}; /* ]]> */ /* <![CDATA[ */ var JOYTwitter_config = {"ajaxurl":"https:\/\/example.com\/wp-admin\/admin-ajax.php","sec":"ecaf121956"}; /* ]]> */ window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","licenseKey":"70c3bbd35e","applicationID":"1953133","transactionName":"M1RRZ0FUX0ZTV0ZRWAoeclBHXF5bHV1cXFIc","queueTime":0,"applicationTime": 1036,"atts":"HxNSEQlOTEg=","errorBeacon":"bam.nr-data.net","agent":""}

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Assets on a page

Slide 50

Slide 50 text

Blockers HTML

Slide 51

Slide 51 text

Blockers HTML CSS

Slide 52

Slide 52 text

Blockers HTML CSS IMG IMG IMG FONTS

Slide 53

Slide 53 text

Blockers HTML CSS IMG IMG IMG JS FONTS

Slide 54

Slide 54 text

Blockers HTML CSS IMG IMG IMG JS IFRAME FONTS

Slide 55

Slide 55 text

Waterfall WebPageTest - webpagetest.org

Slide 56

Slide 56 text

Waterfall WebPageTest - webpagetest.org

Slide 57

Slide 57 text

Waterfall WebPageTest - webpagetest.org

Slide 58

Slide 58 text

Waterfall WebPageTest - webpagetest.org

Slide 59

Slide 59 text

But, we have HTTP/2 now.

Slide 60

Slide 60 text

Everything you know about performance is now wrong and former best practices are now an anti-pattern and considered harmful.

Slide 61

Slide 61 text

These titles are considered harmful

Slide 62

Slide 62 text

caniuse.com/http2, March 2016

Slide 63

Slide 63 text

caniuse.com/http2, March 2016

Slide 64

Slide 64 text

Sites using HTTP/2 w3techs.com, March 2016

Slide 65

Slide 65 text

Traffic

Slide 66

Slide 66 text

Your site running HTTP/2

Slide 67

Slide 67 text

HTTP/2 A fictional guide

Slide 68

Slide 68 text

Slide 69

Slide 69 text

~$

Slide 70

Slide 70 text

~$ ssh 117.53.163.91 443 Connected to 117.53.163.91.

Slide 71

Slide 71 text

~$ ssh 117.53.163.91 443 Connected to 117.53.163.91. Handshake Type: Client Hello Version: TLS 1.2 Server name: example.com

Slide 72

Slide 72 text

~$ ssh 117.53.163.91 443 Connected to 117.53.163.91. Handshake Type: Client Hello Version: TLS 1.2 Server name: example.com Certificate: 14:9f:f0:9e:ab… Certificate Length: 4096 Upgrade: HTTP/2

Slide 73

Slide 73 text

Handshake Type: Client Hello Version: TLS 1.2 Server name: example.com Certificate: 14:9f:f0:9e:ab… Certificate Length: 4096 Upgrade: HTTP/2 ClientKeyExchange: 8C:77:82… GET / HTTP/2 Host: example.com

Slide 74

Slide 74 text

Server name: example.com Certificate: 14:9f:f0:9e:ab… Certificate Length: 4096 Upgrade: HTTP/2 ClientKeyExchange: 8C:77:82… GET / HTTP/2 Host: example.com GET /style.css HTTP/2 GET /script.js HTTP/2

Slide 75

Slide 75 text

Server name: example.com Certificate: 14:9f:f0:9e:ab… Certificate Length: 4096 Upgrade: HTTP/2 ClientKeyExchange: 8C:77:82… GET / HTTP/2 Host: example.com GET /style.css HTTP/2 GET /script.js HTTP/2 .comment-respond{clear:both} @media only screen and (min-width:35em){.comment-form>div{width:50%;float:left} .Comment .comment-form>div{width:auto;float:none} .comment-form>div:nth-child(2n){padding-right:1rem} .Comment .comment-form>div:nth-child(2n){padding-right:0} .comment-form>div:nth-child(2n-1){padding-left:1rem} .Comment .comment-form>div:nth-child(2n-1){padding-left:0} .comment-form>.comment-form_comment.comment-form_comment{width:auto;clear:left;float:none;padding-left:0;padding-right:0} .comment-form_comment ~ div:nth-child(2n){padding-left:1rem;padding-right:0} .Comment .comment-form_comment ~ div:nth-child(2n){padding-left:0} .comment-form_comment ~ div:nth-child(2n-1){padding-right:1rem;padding-left:0} .Comment .comment-form_comment ~ div:nth-child(2n-1){padding-right:0} .comment-form_comment ~ :nth-child(2n-1),.comment-form_comment ~ .form-submit{clear:left} } .SocialShare{color:#bdc2c7} .SocialShare_Title{font-size:13px;font-size:0.8125rem;text-transform:uppercase;line-height:1.8461538462;margin-bottom:0} .SocialShare_List{list-style:none;margin-left:0} .SocialShare_List>li{margin-bottom:0;font-size:13px;font-size:0.8125rem} .SocialLink,.SocialLink:visited{color:inherit;font-size:13px;font-size:0.8125rem;line-height:1.6923076923;min-width:3rem;display:inline-block;text-decoration:none;border:1px solid;border-radius:3px;margin-bottom:. 5rem;padding-right:.3em} .SocialLink:hover,.SocialLink:focus,.SocialLink:active{color:inherit;text-decoration:none} .SocialLink_Count{visibility:hidden} .SocialLink:hover .SocialLink_Count,.SocialLink:focus .SocialLink_Count,.SocialLink_Count .SocialLink:active{visibility:visible} .Comment{font-size:14px;font-size:0.875rem;line-height:1.7142857143;display:block} .Comment,.Comment p,.Comment blockquote,.Comment pre{margin-bottom:1.7142857143em} .Comment-withAvatar{margin-left:64px;min-height:56px} .Comment_Meta{color:#bdc2c7} .Comment_Avatar{width:48px;height:48px;position:absolute;margin-top:4px;margin-left:-64px} .Comment_Avatar>img{width:48px;height:48px} .Comment_Name,.Comment_Time,.Comment_Time>a{font-family:inherit;font-size:inherit;text-transform:inherit;font-weight:inherit;font-style:inherit;margin-bottom:0} .Comment_Name{float:left} .Comment_Time{float:right} .Comment_Time>a{color:inherit} .Comment_Moderation.Comment_Moderation{margin-bottom:0;font-style:italic} .Comment_Body{clear:right} .Comment-withAvatar .Comment_Body{float:left} .Comment_Body :last-child{margin-bottom:0} .comment-reply-link,.comment-reply-link:visited{color:#bdc2c7;text-transform:uppercase} .comment-reply-link:hover,.comment-reply-link:focus,.comment-reply-link:visited{color:#bdc2c7} .CommentList{margin-left:0;display:block} .CommentList+.Pagination{margin-bottom:6rem} .Section{margin-bottom:6rem;margin-left:1em;margin-right:1em} @media only screen and (min-width:48em){.Section{margin-left:6em;margin-right:6em} } .PostList{list-style:none;margin-left:0} .PostList_Post{margin-bottom:6rem} .PostList_Post-NoExcerpt{margin-bottom:3rem} .more-link{display:block;margin-top:1.5em} .Page_Main{padding-top:1.5rem;padding-bottom:1.5rem;background-color:#fff} .Page_Footer{padding-top:1.5rem} @media (min-width:60em){.Page_Header{float:left;width:220px} .Page_Main{float:left;width:calc( 100% - 440px )} .Page_Sidebar{float:left;width:220px;min-height:50px} .Page_Footer{clear:both} } .t-Singular .Headline,.t-Singular .EntryMeta,.Pagination-PrevNextPost{margin-left:1rem;margin-right:1rem} @media only screen and (min-width:48em){.t-Singular .Headline,.t-Singular .EntryMeta,.Pagination-PrevNextPost{margin-left:6rem;margin-right:6rem} } .Pagination-PrevNextPost{margin-bottom:3rem} .EntryMeta{position:relative} .EntryMeta .SocialShare_List>li{display:inline-block;padding-right:.25em} @media only screen and (min-width:60em){.EntryMeta .SocialShare_List>li{display:list-item} .EntryMeta .SocialShare{position:absolute;width:70px;background:white;top:0;left:100%;padding-left:.5rem;padding-top:2em;left:calc( 100% + 6rem )} } .fluid-width-video-wrapper{width:100%;max-width:126.6666666667vh;position:relative;padding:0;margin-left:auto;margin-right:auto} .fluid-width-video-wrapper:before{display:block;width:100%;padding-top:75%;content:' '} .fluid-width-video-wrapper>iframe,.fluid-width-video-wrapper>object,.fluid-width-video-wrapper>embed{position:absolute;top:0;left:0;width:100%;height:100%} .alignleft{float:left;margin-right:1em;margin-bottom:1em;margin-left:-1rem} @media only screen and (min-width:60em){.alignleft{margin-left:-5rem} } .alignright{float:right;margin-left:1em;margin-bottom:1em;margin-right:-1rem} @media only screen and (min-width:60em){.alignright{margin-right:-5rem} } .instagram-image .keyring-img,.wp-post-image,figure.alignnone,img.alignnone,.aligncenter{display:block;margin-left:auto;margin-right:auto} .post-password-form label{color:#bdc2c7;font-size:13px;font-size:0.8125rem;line-height:1.2307692308;text-transform:uppercase;display:block;margin-bottom:.5rem} .post-password-form [type=password]{width:100%;border-radius:2px;color:#2a2b2b;background-color:#f3f3f3;font-size:14px;font-size:0.875rem;line-height:1.7142857143;border-width:1px;outline:none;padding:calc( .5rem - 1px ) 0.75rem;border-style:solid;border-color:#f3f3f3}

Slide 77

Slide 77 text

Server push

Slide 78

Slide 78 text

Handshake Type: Client Hello Version: TLS 1.2 Server name: example.com Certificate: 14:9f:f0:9e:ab… Certificate Length: 4096 Upgrade: HTTP/2 ClientKeyExchange: 8C:77:82… GET / HTTP/2 Host: example.com

Slide 79

Slide 79 text

Server name: example.com Certificate: 14:9f:f0:9e:ab… Certificate Length: 4096 Upgrade: HTTP/2 ClientKeyExchange: 8C:77:82… GET / HTTP/2 Host: example.com

Slide 80

Slide 80 text

Server name: example.com Certificate: 14:9f:f0:9e:ab… Certificate Length: 4096 Upgrade: HTTP/2 ClientKeyExchange: 8C:77:82… GET / HTTP/2 Host: example.com Link:;rel=preload Link:;rel=preload

Slide 81

Slide 81 text

Server name: example.com Certificate: 14:9f:f0:9e:ab… Certificate Length: 4096 Upgrade: HTTP/2 ClientKeyExchange: 8C:77:82… GET / HTTP/2 Host: example.com Link:;rel=preload Link:;rel=preload .comment-respond{clear:both} @media only screen and (min-width:35em){.comment-form>div{width:50%;float:left} .Comment .comment-form>div{width:auto;float:none} .comment-form>div:nth-child(2n){padding-right:1rem} .Comment .comment-form>div:nth-child(2n){padding-right:0} .comment-form>div:nth-child(2n-1){padding-left:1rem} .Comment .comment-form>div:nth-child(2n-1){padding-left:0} .comment-form>.comment-form_comment.comment-form_comment{width:auto;clear:left;float:none;padding-left:0;padding-right:0} .comment-form_comment ~ div:nth-child(2n){padding-left:1rem;padding-right:0} .Comment .comment-form_comment ~ div:nth-child(2n){padding-left:0} .comment-form_comment ~ div:nth-child(2n-1){padding-right:1rem;padding-left:0} .Comment .comment-form_comment ~ div:nth-child(2n-1){padding-right:0} .comment-form_comment ~ :nth-child(2n-1),.comment-form_comment ~ .form-submit{clear:left} } .SocialShare{color:#bdc2c7} .SocialShare_Title{font-size:13px;font-size:0.8125rem;text-transform:uppercase;line-height:1.8461538462;margin-bottom:0} .SocialShare_List{list-style:none;margin-left:0} .SocialShare_List>li{margin-bottom:0;font-size:13px;font-size:0.8125rem} .SocialLink,.SocialLink:visited{color:inherit;font-size:13px;font-size:0.8125rem;line-height:1.6923076923;min-width:3rem;display:inline-block;text-decoration:none;border:1px solid;border-radius:3px;margin-bottom:. 5rem;padding-right:.3em} .SocialLink:hover,.SocialLink:focus,.SocialLink:active{color:inherit;text-decoration:none} .SocialLink_Count{visibility:hidden} .SocialLink:hover .SocialLink_Count,.SocialLink:focus .SocialLink_Count,.SocialLink_Count .SocialLink:active{visibility:visible} .Comment{font-size:14px;font-size:0.875rem;line-height:1.7142857143;display:block} .Comment,.Comment p,.Comment blockquote,.Comment pre{margin-bottom:1.7142857143em} .Comment-withAvatar{margin-left:64px;min-height:56px} .Comment_Meta{color:#bdc2c7} .Comment_Avatar{width:48px;height:48px;position:absolute;margin-top:4px;margin-left:-64px} .Comment_Avatar>img{width:48px;height:48px} .Comment_Name,.Comment_Time,.Comment_Time>a{font-family:inherit;font-size:inherit;text-transform:inherit;font-weight:inherit;font-style:inherit;margin-bottom:0} .Comment_Name{float:left} .Comment_Time{float:right} .Comment_Time>a{color:inherit} .Comment_Moderation.Comment_Moderation{margin-bottom:0;font-style:italic} .Comment_Body{clear:right} .Comment-withAvatar .Comment_Body{float:left} .Comment_Body :last-child{margin-bottom:0} .comment-reply-link,.comment-reply-link:visited{color:#bdc2c7;text-transform:uppercase} .comment-reply-link:hover,.comment-reply-link:focus,.comment-reply-link:visited{color:#bdc2c7} .CommentList{margin-left:0;display:block} .CommentList+.Pagination{margin-bottom:6rem} .Section{margin-bottom:6rem;margin-left:1em;margin-right:1em} @media only screen and (min-width:48em){.Section{margin-left:6em;margin-right:6em} } .PostList{list-style:none;margin-left:0} .PostList_Post{margin-bottom:6rem} .PostList_Post-NoExcerpt{margin-bottom:3rem} .more-link{display:block;margin-top:1.5em} .Page_Main{padding-top:1.5rem;padding-bottom:1.5rem;background-color:#fff} .Page_Footer{padding-top:1.5rem} @media (min-width:60em){.Page_Header{float:left;width:220px} .Page_Main{float:left;width:calc( 100% - 440px )} .Page_Sidebar{float:left;width:220px;min-height:50px} .Page_Footer{clear:both} } .t-Singular .Headline,.t-Singular .EntryMeta,.Pagination-PrevNextPost{margin-left:1rem;margin-right:1rem} @media only screen and (min-width:48em){.t-Singular .Headline,.t-Singular .EntryMeta,.Pagination-PrevNextPost{margin-left:6rem;margin-right:6rem} } .Pagination-PrevNextPost{margin-bottom:3rem} .EntryMeta{position:relative} .EntryMeta .SocialShare_List>li{display:inline-block;padding-right:.25em} @media only screen and (min-width:60em){.EntryMeta .SocialShare_List>li{display:list-item} .EntryMeta .SocialShare{position:absolute;width:70px;background:white;top:0;left:100%;padding-left:.5rem;padding-top:2em;left:calc( 100% + 6rem )} } .fluid-width-video-wrapper{width:100%;max-width:126.6666666667vh;position:relative;padding:0;margin-left:auto;margin-right:auto} .fluid-width-video-wrapper:before{display:block;width:100%;padding-top:75%;content:' '} .fluid-width-video-wrapper>iframe,.fluid-width-video-wrapper>object,.fluid-width-video-wrapper>embed{position:absolute;top:0;left:0;width:100%;height:100%} .alignleft{float:left;margin-right:1em;margin-bottom:1em;margin-left:-1rem} @media only screen and (min-width:60em){.alignleft{margin-left:-5rem} } .alignright{float:right;margin-left:1em;margin-bottom:1em;margin-right:-1rem} @media only screen and (min-width:60em){.alignright{margin-right:-5rem} } .instagram-image .keyring-img,.wp-post-image,figure.alignnone,img.alignnone,.aligncenter{display:block;margin-left:auto;margin-right:auto} .post-password-form label{color:#bdc2c7;font-size:13px;font-size:0.8125rem;line-height:1.2307692308;text-transform:uppercase;display:block;margin-bottom:.5rem} .post-password-form [type=password]{width:100%;border-radius:2px;color:#2a2b2b;background-color:#f3f3f3;font-size:14px;font-size:0.875rem;line-height:1.7142857143;border-width:1px;outline:none;padding:calc( .5rem - 1px ) 0.75rem;border-style:solid;border-color:#f3f3f3}

Slide 82

Slide 82 text

Server push Nag your system admins to install this.

Slide 83

Slide 83 text

Performance wars

Slide 84

Slide 84 text

Everything you know about performance is now wrong and former best practices are now an anti-pattern and considered harmful.

Slide 85

Slide 85 text

HTTP/1’s former best practices can be harmful over HTTP/2.

Slide 86

Slide 86 text

Critical path CSS Example.com html{font-family:sans-serif;} body{margin:0} article,aside,details,figcaption,figure, footer,header,hgroup,main,nav,section,summary

Slide 87

Slide 87 text

HTTP/1, without critical path CSS HTML CSS

Slide 88

Slide 88 text

HTTP/1, with critical path CSS HTML CSS

Slide 89

Slide 89 text

HTTP/2, with critical path CSS HTML CSS

Slide 90

Slide 90 text

HTTP/2, without critical path CSS HTML CSS

Slide 91

Slide 91 text

HTTP/2 server push

Slide 92

Slide 92 text

w3.org/TR/preload/

Slide 93

Slide 93 text

Server push

Slide 94

Slide 94 text

Server push

Slide 95

Slide 95 text

Server push if ( is_http2() ) { header( 'link:; rel=preload; as=style' ); header( 'link:; rel=preload; as=script'); }

Slide 96

Slide 96 text

Server push if ( is_http2() ) { header( 'link:; rel=preload; as=style' ); header( 'link:; rel=preload; as=script'); } PHP code samples

Slide 97

Slide 97 text

Server push if ( is_http2() ) { header( 'link:; rel=preload; as=style' ); header( 'link:; rel=preload; as=script'); }

Slide 98

Slide 98 text

Server push is unsophisticated

Slide 99

Slide 99 text

Server push if ( ! is_cached( '/style.css' ) && is_http2() ) { header( 'link:; rel=preload; as=style' ); }

Slide 100

Slide 100 text

Server push if ( ! is_cached( '/style.css' ) && is_http2() ) { header( 'link:; rel=preload; as=style' ); setcookie( '/style.css', 'cached', 0, '/' ); }

Slide 101

Slide 101 text

is_cached() function is_cached( $filename ) { if ( 'cached' === $_COOKIE[ $filename ] ) { return true; } else { return false; } }

Slide 102

Slide 102 text

https://h2o.examp1e.net/configure/http2_directives.html

Slide 103

Slide 103 text

Critical path CSS A modern approach

Slide 104

Slide 104 text

pwcc.cc/respond/loadcss

Slide 105

Slide 105 text

HTTP/1, with critical path CSS HTML CSS

Slide 106

Slide 106 text

HTTP/2, without critical path CSS HTML CSS

Slide 107

Slide 107 text

/* Critical CSS */ function loadCSS(){/* Source inline */} function setcookie(){/* Source inline */} loadCSS( '/style.css' ); setcookie( '/style.css', 'cached', 0, '/' ); HTML: uncached HTTP/1

Slide 108

Slide 108 text

; rel=preload; as=style' ); setcookie( '/style.css', 'cached', 0, '/' ); } ?>

Slide 109

Slide 109 text

Slide 110

Slide 110 text

Slide 111

Slide 111 text

Web fonts

Slide 112

Slide 112 text

No content

Slide 113

Slide 113 text

Visual progress Via WebPageTest

Slide 114

Slide 114 text

Visual progress Via WebPageTest

Slide 115

Slide 115 text

Blocking render with web fonts html { font-family: "Open Sans", sans-serif; }

Slide 116

Slide 116 text

External resources

Slide 117

Slide 117 text

External resources prevent server push

Slide 118

Slide 118 text

External resources in effect, drop back to HTTP/1

Slide 119

Slide 119 text

No content

Slide 120

Slide 120 text

No content

Slide 121

Slide 121 text

No content

Slide 122

Slide 122 text

caniuse.com/font-loading, March 2016

Slide 123

Slide 123 text

caniuse.com/font-loading, March 2016

Slide 124

Slide 124 text

pwcc.cc/respond/fout

Slide 125

Slide 125 text

FOUT var openSans = new FontFaceObserver( "Open Sans" ); openSans .check() .then( function(){ document.documentElement.className += " wf-active"; setCookie( 'wf', 'active' ); } );

Slide 126

Slide 126 text

FOUT var openSans = new FontFaceObserver( "Open Sans" ); openSans .check() .then( function(){ document.documentElement.className += " wf-active"; setCookie( 'wf', 'active' ); } );

Slide 127

Slide 127 text

FOUT html { font-family: "Open Sans", sans-serif; }

Slide 128

Slide 128 text

html.wf-active { font-family: "Open Sans", sans-serif; } FOUT

Slide 129

Slide 129 text

family=Open+Sans:400,400italic,700,700italic' 
 rel='stylesheet' type='text/css'> html.wf-active { font-family: "Open Sans", sans-serif; } if ( 'active' === getCookie( 'wf' ) ) { document.documentElement.className += " wf-active"; } FOUT

Slide 130

Slide 130 text

Web fonts are an enhancement

Slide 131

Slide 131 text

Locally hosted fonts

Slide 132

Slide 132 text

Locally hosted, HTTP/2 fonts HTML Font

Slide 133

Slide 133 text

HTTP/2 presents an opportunity

Slide 134

Slide 134 text

…to break the web, again

Slide 135

Slide 135 text

Yutaka Tsutano (CC) - flic.kr/p/dq5sCy

Slide 136

Slide 136 text

Breaking things /* ------ TABLET ------ */ @media only screen and ( min-width : 768px ) and ( max-width : 1024px ) { }

Slide 137

Slide 137 text

Mike Deerkoski (CC) - flic.kr/p/bWmqBT It’s the same size but smaller

Slide 138

Slide 138 text

⭐⭐⭐⭐"

Slide 139

Slide 139 text

Everything you know about performance is now wrong and former best practices are now an anti-pattern and considered harmful.

Slide 140

Slide 140 text

Everything you know about performance is now twice as complicated.

Slide 141

Slide 141 text

Thank you. Peter Wilson • peterwilson.cc • @pwcc