Slide 1

Slide 1 text

How better performing websites can help save the planet Jack Lenox WordCamp Bordeaux, March 2019

Slide 2

Slide 2 text

Me 2009 - 2013: Startup/agency work 2013 - present: Automattic (WordPress.com VIP since 2015) 2017: UK parliamentary candidate for the Green Party

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Part I: The Problem

Slide 10

Slide 10 text

The Internet has an enormous carbon footprint

Slide 11

Slide 11 text

...and it's rapidly growing

Slide 12

Slide 12 text

The Internet produces about one billion tonnes of COâ‚‚ every year...

Slide 13

Slide 13 text

...and it's rising

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Poorly performing websites are bad for the environment

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

Part II: The Solution

Slide 28

Slide 28 text

Sustainable Web Design

Slide 29

Slide 29 text

Sustainable Web Design 1. Performance 2. Usability 3. Discoverability 4. Green Hosting

Slide 30

Slide 30 text

Sustainable Web Design 1. Performance 2. Usability 3. Discoverability 4. Green Hosting

Slide 31

Slide 31 text

Performance and usability

Slide 32

Slide 32 text

Simplify the user interface Background videos Social media embeds Carousels

Slide 33

Slide 33 text

Get rid of them

Slide 34

Slide 34 text

Reduce code Create lean HTML Simplify CSS Use less script

Slide 35

Slide 35 text

The most performant[, sustainable], accessible and easily maintainable feature of a website is the one that you don't make in the first place. - Heydon Pickering

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

Use less script This button weighs 50 KB. A plain text link uses almost zero bytes.

Slide 38

Slide 38 text

Images Use the correct image Compress images as much as possible Lazy load

Slide 39

Slide 39 text

The correct image... JPG: Still images, photography GIF: In the olden days used for animations, today should be avoided PNG-8: Icons (but SVG is probably better) PNG-24: Still images with transparency, generally to be avoided if possible SVG: Icons, logos, etc.

Slide 40

Slide 40 text

WebP 26% smaller than PNGs 25-34% smaller than JPGs Support animation

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Compress

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

Lazy load

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

A word about fonts Subset for just the characters you need Be sparing in how many fonts you load Serve them only in the .woff2 format if possible

Slide 47

Slide 47 text

Backend stuff Use HTTPS over HTTP2 Nginx with FastCGI Cache WP Super Cache gzip and brotli compression

Slide 48

Slide 48 text

Sustainable Web Design 1. Performance 2. Usability 3. Discoverability 4. Green Hosting

Slide 49

Slide 49 text

SEO (Search Engine Optimisation) WordPress SEO by Yoast All in One SEO Pack Neither of the above

Slide 50

Slide 50 text

Accessibility Adopt an accessibility-first mentality Simple websites are, generally speaking, accessible by default Follow best practices

Slide 51

Slide 51 text

Sustainable Web Design 1. Performance 2. Usability 3. Discoverability 4. Green Hosting

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

Part III: The Doing

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

Taking this to an extreme No images No sidebar No embeds No menu navigation (it's on its own page) Almost no additional HTTP requests

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

In the Real World

Slide 70

Slide 70 text

No content

Slide 71

Slide 71 text

(417KB)

Slide 72

Slide 72 text

No content

Slide 73

Slide 73 text

(409KB)

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

(379KB)

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

(213KB)

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

(435KB)

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

(11KB)

Slide 82

Slide 82 text

In conclusion

Slide 83

Slide 83 text

Sustainable websites are More performant More user-friendly More accessible More server-friendly More -friendly

Slide 84

Slide 84 text

Merci beaucoup

Slide 85

Slide 85 text

Any questions?* @jacklenox | jacklenox.com *Please don't ask me about Brexit

Slide 86

Slide 86 text

Bibilography electricityMap: www.electricitymap.org Internet Health Report: internethealthreport.org Greenpeace's ClickClean: www.clickclean.org SustainableUX: sustainableux.com "The average web page is 3MB. How much should we care?", Tammy Everts: speedcurve.com/blog/web-performance-page-bloat/ "Designing for actual performance", Adam Silver: adamsilver.io/articles/designing-for- actual-performance/ "Writing Less Damn Code", Heydon Pickering: www.heydonworks.com/article/on-writing- less-damn-code "How I dropped 250KB of dead CSS weight with PurgeCSS", Sarah Dayan: medium.freecodecamp.org/how-i-dropped-250kb-of-dead-css-weight-with-purgecss- 28821049fb

Slide 87

Slide 87 text

ImageOptim: imageoptim.com "Lazy Loading Images and Video", Jeremy Wagner: developers.google.com/web/fundamentals/performance/lazy-loading-guidance/images- and-video/ The Green Web Foundation: www.thegreenwebfoundation.org SustyWP: sustywp.com WebPagetest: www.webpagetest.org Calibre: calibreapp.com SpeedCurve: speedcurve.com EcoGrader: ecograder.com ecometer: ecometer.org WebsiteCarbon: www.websitecarbon.com Sustainable Servers petition: www.change.org/p/sustainable-servers-by-2024