Slide 1

Slide 1 text

@jonoalderson 0.6 seconds is the new slow

Slide 2

Slide 2 text

@jonoalderson Hello!

Slide 3

Slide 3 text

@jonoalderson WARNING!

Slide 4

Slide 4 text

@jonoalderson Users expect fast

Slide 5

Slide 5 text

@jonoalderson Delays of over 3 seconds can lead to over 40% abandonment Google, 2016, via http:/ /bit.ly/2OBDJGq

Slide 6

Slide 6 text

@jonoalderson Wired Magazine, 2014 47% of people expect a site to load in less than 2 seconds

Slide 7

Slide 7 text

@jonoalderson 20% of users abandon their cart if the transaction process is too slow Radware, 2014, http:/ /bit.ly/2weioeS

Slide 8

Slide 8 text

@jonoalderson Baqend, 2018, http:/ /bit.ly/2MA4nSZ

Slide 9

Slide 9 text

@jonoalderson Time is money

Slide 10

Slide 10 text

@jonoalderson Think with Google, http:/ /bit.ly/2N3BXRz

Slide 11

Slide 11 text

@jonoalderson So, how well are we performing?

Slide 12

Slide 12 text

@jonoalderson We suck

Slide 13

Slide 13 text

@jonoalderson Industry USA UK Germany Japan Automotive 9.5 12.3 11.0 10.3 Business & Industrial Markets 8.7 8.3 8.2 8.1 Classifieds & Local 7.9 8.3 7.0 8.3 Finance 8.3 8.0 8.6 7.6 Media & Entertainment 9.0 8.8 7.6 8.4 Retail 9.8 10.3 10.3 8.3 Technology 11.3 10.6 8.8 10.0 Travel 10.1 10.9 7.1 8.2 MachMetrics, 2018, http:/ /bit.ly/2PiFzgK Seconds to “visually loaded” on a 3g connection

Slide 14

Slide 14 text

@jonoalderson But not for long...

Slide 15

Slide 15 text

@jonoalderson

Slide 16

Slide 16 text

@jonoalderson Google Webmaster Blog, 2018, http:/ /bit.ly/2wggdHs

Slide 17

Slide 17 text

@jonoalderson Google Webmaster Blog, 2018, http:/ /bit.ly/2wggdHs

Slide 18

Slide 18 text

@jonoalderson “Speed underpins user experience”

Slide 19

Slide 19 text

@jonoalderson User experience is the biggest ranking factor*

Slide 20

Slide 20 text

@jonoalderson And for Google, speed = efficiency

Slide 21

Slide 21 text

@jonoalderson User experience Crawl efficiency Speed

Slide 22

Slide 22 text

@jonoalderson

Slide 23

Slide 23 text

@jonoalderson

Slide 24

Slide 24 text

@jonoalderson

Slide 25

Slide 25 text

@jonoalderson So, efficiency speed improvements will continue to drive revenue

Slide 26

Slide 26 text

@jonoalderson So, if you wait until your competitors are faster than you, you’ll be too late

Slide 27

Slide 27 text

@jonoalderson And as sites get faster, slow is going to feel slower

Slide 28

Slide 28 text

@jonoalderson “So, what do we need to do?”

Slide 29

Slide 29 text

@jonoalderson HINT: It’s not a big web (re)development project

Slide 30

Slide 30 text

@jonoalderson “We have a big site redevelopment process in the works, scheduled for Summer 2019”

Slide 31

Slide 31 text

@jonoalderson “We have a big site redevelopment process in the works, scheduled for Summer 2019” No No

Slide 32

Slide 32 text

@jonoalderson You win by a thousand tweaks

Slide 33

Slide 33 text

@jonoalderson Now, and every day, forever

Slide 34

Slide 34 text

@jonoalderson Make bits of it FASTER

Slide 35

Slide 35 text

@jonoalderson But what does that mean? And where do you start?

Slide 36

Slide 36 text

@jonoalderson There are two truths

Slide 37

Slide 37 text

@jonoalderson [1] There’s no such thing as speed.

Slide 38

Slide 38 text

@jonoalderson How do you measure ‘speed’?

Slide 39

Slide 39 text

@jonoalderson “The time how long it takes for a page to finish loading”

Slide 40

Slide 40 text

@jonoalderson But, what does that mean?

Slide 41

Slide 41 text

@jonoalderson What if the server responds quickly, but then it takes ages to show the content?

Slide 42

Slide 42 text

@jonoalderson What if the page has components which only load when you interact, or scroll? Are they “finished”?

Slide 43

Slide 43 text

@jonoalderson We need better definitions

Slide 44

Slide 44 text

@jonoalderson Most stock metrics from speed check + optimisation tools suck

Slide 45

Slide 45 text

@jonoalderson Pingdom, Website speed test, https:/ /tools.pingdom.com/

Slide 46

Slide 46 text

@jonoalderson Pingdom, Website speed test, https:/ /tools.pingdom.com/ Doesn’t actually measure

Slide 47

Slide 47 text

@jonoalderson Pingdom, Website speed test, https:/ /tools.pingdom.com/ At that point in time, for that URL, for that config, from that location Doesn’t actually measure

Slide 48

Slide 48 text

@jonoalderson Pingdom, Website speed test, https:/ /tools.pingdom.com/ Relative to other people testing their homepages At that point in time, for that URL, for that config, from that location Doesn’t actually measure

Slide 49

Slide 49 text

@jonoalderson Load fewer, smaller things, duh Pingdom, Website speed test, https:/ /tools.pingdom.com/ Relative to other people testing their homepages At that point in time, for that URL, for that config, from that location Doesn’t actually measure

Slide 50

Slide 50 text

@jonoalderson GTMetrix, https:/ /gtmetrix.com/

Slide 51

Slide 51 text

@jonoalderson GTMetrix, https:/ /gtmetrix.com/

Slide 52

Slide 52 text

@jonoalderson GTMetrix, https:/ /gtmetrix.com/

Slide 53

Slide 53 text

@jonoalderson Silly! GTMetrix, https:/ /gtmetrix.com/

Slide 54

Slide 54 text

@jonoalderson Google Analytics

Slide 55

Slide 55 text

@jonoalderson Google Analytics

Slide 56

Slide 56 text

@jonoalderson Google PageSpeed Insights, http:/ /bit.ly/2BxHcEw

Slide 57

Slide 57 text

@jonoalderson !!! “First contentful paint” Google PageSpeed Insights, http:/ /bit.ly/2BxHcEw

Slide 58

Slide 58 text

@jonoalderson Google PageSpeed Insights, http:/ /bit.ly/2LbGw7j

Slide 59

Slide 59 text

@jonoalderson “How quickly can we show something interesting?”

Slide 60

Slide 60 text

@jonoalderson Let’s grab an example

Slide 61

Slide 61 text

@jonoalderson

Slide 62

Slide 62 text

@jonoalderson Nav interactivity Fonts Personalised / account stuff Share buttons Author images Comments, related posts, all sorts! Video Big image Tons of CSS jQuery(!)

Slide 63

Slide 63 text

@jonoalderson

Slide 64

Slide 64 text

@jonoalderson Lazy video placeholder Skeleton container for image Stopped these assets from loading on the initial page load Personalised / account stuff via ajax Nav interactivity loads later Prioritise font loading

Slide 65

Slide 65 text

@jonoalderson [Things we’re obsessing about] ● Lazy loading ● Bytes transferred ● Complexity of DOM, CSS and JS ● Painting, layout and layering ● Colours, details, icons

Slide 66

Slide 66 text

@jonoalderson Site looks & feels faster :)

Slide 67

Slide 67 text

@jonoalderson Scores didn’t change much :(

Slide 68

Slide 68 text

@jonoalderson Don’t optimise for scores. Just make it faster.

Slide 69

Slide 69 text

@jonoalderson [2] The only thing which matters is the perception of speed.

Slide 70

Slide 70 text

@jonoalderson Google, Lighthouse docs, http:/ /bit.ly/2PvhraI

Slide 71

Slide 71 text

@jonoalderson However, there’s one golden moment...

Slide 72

Slide 72 text

@jonoalderson Google, Lighthouse docs, http:/ /bit.ly/2PvhraI

Slide 73

Slide 73 text

@jonoalderson “How quickly can we make it feel ready?”

Slide 74

Slide 74 text

@jonoalderson Perceived speed is hard to quantify!

Slide 75

Slide 75 text

@jonoalderson And there are lots of moving parts.

Slide 76

Slide 76 text

@jonoalderson

Slide 77

Slide 77 text

@jonoalderson

Slide 78

Slide 78 text

@jonoalderson Service workers

Slide 79

Slide 79 text

@jonoalderson Service workers After load

Slide 80

Slide 80 text

@jonoalderson Scary?

Slide 81

Slide 81 text

@jonoalderson Performance optimisation is no longer an art. It’s a science.

Slide 82

Slide 82 text

@jonoalderson Every site in the world can load in <1s.

Slide 83

Slide 83 text

@jonoalderson You just need to follow the rules.

Slide 84

Slide 84 text

@jonoalderson Google PageSpeed Insights, http:/ /bit.ly/2MhP9lT

Slide 85

Slide 85 text

@jonoalderson Google PageSpeed Insights, http:/ /bit.ly/2MhP9lT The internet, the speed of light

Slide 86

Slide 86 text

@jonoalderson Google PageSpeed Insights, http:/ /bit.ly/2MhP9lT Hosting, servers, CDNs The internet, the speed of light

Slide 87

Slide 87 text

@jonoalderson Google PageSpeed Insights, http:/ /bit.ly/2MhP9lT Hosting, servers, CDNs The internet, the speed of light CMS, plugins & extensions

Slide 88

Slide 88 text

@jonoalderson Google PageSpeed Insights, http:/ /bit.ly/2MhP9lT Hosting, servers, CDNs HTML, CSS & JS The internet, the speed of light CMS, plugins & extensions

Slide 89

Slide 89 text

@jonoalderson Where do we start?

Slide 90

Slide 90 text

@jonoalderson Me, just now

Slide 91

Slide 91 text

@jonoalderson Just go and find the slow stuff.

Slide 92

Slide 92 text

@jonoalderson Use tools to spot problems

Slide 93

Slide 93 text

@jonoalderson Webpagetest

Slide 94

Slide 94 text

@jonoalderson Webpagetest

Slide 95

Slide 95 text

@jonoalderson Webpagetest

Slide 96

Slide 96 text

@jonoalderson Pingdom Website Speed Test, http:/ /bit.ly/2MhP9lT

Slide 97

Slide 97 text

@jonoalderson Pingdom Website Speed Test, http:/ /bit.ly/2MhP9lT

Slide 98

Slide 98 text

@jonoalderson

Slide 99

Slide 99 text

@jonoalderson So we refactored that file... 1 dev, 1 day

Slide 100

Slide 100 text

@jonoalderson

Slide 101

Slide 101 text

@jonoalderson 0.6 seconds

Slide 102

Slide 102 text

@jonoalderson Wow!

Slide 103

Slide 103 text

@jonoalderson However… I may not have been completely honest with you.

Slide 104

Slide 104 text

@jonoalderson

Slide 105

Slide 105 text

@jonoalderson

Slide 106

Slide 106 text

@jonoalderson

Slide 107

Slide 107 text

@jonoalderson 0.6 seconds on a fast desktop wifi 2.7 seconds on ‘fast 3g’ emulation slow!

Slide 108

Slide 108 text

@jonoalderson That’s a bit rubbish...

Slide 109

Slide 109 text

@jonoalderson We’re on a journey of 1,000 tweaks. There is no magic bullet.

Slide 110

Slide 110 text

@jonoalderson So what can you do, today?

Slide 111

Slide 111 text

@jonoalderson Here’s how you shortcut speed Some “quick” wins!

Slide 112

Slide 112 text

@jonoalderson 0. Load less stuff 1. Tidy up your CMS 2. Bolt on a CDN (Cloudflare) 3. Get good hosting 4. Use a static page cache 5. Optimise your resources 6. Use AMP(?)

Slide 113

Slide 113 text

@jonoalderson 0. Load less stuff

Slide 114

Slide 114 text

@jonoalderson ● Plugins, extensions and integrations ● Fonts ● JavaScript [BASICS]

Slide 115

Slide 115 text

@jonoalderson ● Lazy-loading resources ● Cross-domain resource reduction ● DNS & asset prefetch/preload [ADVANCED]

Slide 116

Slide 116 text

@jonoalderson Machmetrics, http:/ /bit.ly/2wrfjYX

Slide 117

Slide 117 text

@jonoalderson 1. Tidy up your CMS

Slide 118

Slide 118 text

@jonoalderson [BASICS] ● Use plugins, extensions and integrations to measure(!)

Slide 119

Slide 119 text

@jonoalderson

Slide 120

Slide 120 text

@jonoalderson 2. Bolt on a CDN

Slide 121

Slide 121 text

@jonoalderson

Slide 122

Slide 122 text

@jonoalderson

Slide 123

Slide 123 text

@jonoalderson

Slide 124

Slide 124 text

@jonoalderson ● HTTP/2 ● Server Push [ADVANCED]

Slide 125

Slide 125 text

@jonoalderson Tom Anthony, Distilled, http:/ /bit.ly/2MhP9lT

Slide 126

Slide 126 text

@jonoalderson 3. Get better hosting

Slide 127

Slide 127 text

@jonoalderson

Slide 128

Slide 128 text

@jonoalderson DIY sites (any size) Managed small-medium sites Large / enterprise sites

Slide 129

Slide 129 text

@jonoalderson 4. Use a static page cache

Slide 130

Slide 130 text

@jonoalderson

Slide 131

Slide 131 text

@jonoalderson 5. Optimise your resources

Slide 132

Slide 132 text

@jonoalderson

Slide 133

Slide 133 text

@jonoalderson ● Offload media to, e.g., Amazon S3 ● Use an image CDN like Cloudinary or Imgix ● Modularise CSS and JavaScript [ADVANCED]

Slide 134

Slide 134 text

@jonoalderson Chrome Dev Tools, Coverage report

Slide 135

Slide 135 text

@jonoalderson 6. Use Amp (?)

Slide 136

Slide 136 text

@jonoalderson

Slide 137

Slide 137 text

@jonoalderson

Slide 138

Slide 138 text

@jonoalderson This stuff makes a difference

Slide 139

Slide 139 text

@jonoalderson

Slide 140

Slide 140 text

@jonoalderson 0.4 seconds

Slide 141

Slide 141 text

@jonoalderson 0.4 seconds on a fast desktop wifi 1.9 seconds on ‘fast 3g’ emulation Less slow!

Slide 142

Slide 142 text

@jonoalderson So, what’s still to do?

Slide 143

Slide 143 text

@jonoalderson Canonical AMP Automatic CSS tree shaking!

Slide 144

Slide 144 text

@jonoalderson PWAMP AMP Project, http:/ /bit.ly/2wog8lN

Slide 145

Slide 145 text

@jonoalderson Post-load interaction improvements

Slide 146

Slide 146 text

@jonoalderson New ways of thinking about CSS Me, https:/ /bit.ly/2D5Dlgy

Slide 147

Slide 147 text

@jonoalderson Emily Hayman, http:/ /bit.ly/2MILD4c

Slide 148

Slide 148 text

@jonoalderson Resources

Slide 149

Slide 149 text

@jonoalderson Emily Grossman, SkyScanner, http:/ /bit.ly/2wjnkzR

Slide 150

Slide 150 text

@jonoalderson Jon Henshaw, http:/ /bit.ly/2wwy5xZ

Slide 151

Slide 151 text

@jonoalderson Bastian Grimm, Peak Ace, http:/ /bit.ly/2wjnkzR

Slide 152

Slide 152 text

@jonoalderson

Slide 153

Slide 153 text

@jonoalderson Google Web Fundamentals, http:/ /bit.ly/2wlVeUI

Slide 154

Slide 154 text

@jonoalderson Google Web Fundamentals, http:/ /bit.ly/2wlVeUI

Slide 155

Slide 155 text

@jonoalderson AMP Project, http:/ /bit.ly/2PhDKj1

Slide 156

Slide 156 text

@jonoalderson

Slide 157

Slide 157 text

@jonoalderson Thanks!