46
Firefox
(Gecko)
srcset (partial) N/A
srcset (full) +
sizes
behind a flag: FF33
on by default: FF34?
picture behind a flag: FF33
on by default: FF34?
Slide 47
Slide 47 text
47
Firefox
(Gecko)
Chrome/Opera
(Blink)
srcset (partial) N/A Chrome 34
srcset (full) +
sizes
behind a flag: FF33
on by default: FF34?
behind a flag: Chrome 37
on by default: Chrome 38
picture behind a flag: FF33
on by default: FF34?
behind a flag: Chrome 37
on by default: Chrome 38
Slide 48
Slide 48 text
48
Firefox
(Gecko)
Chrome/Opera
(Blink)
Safari
(WebKit)
srcset (partial) N/A Chrome 34 Safari 8
srcset (full) +
sizes
behind a flag: FF33
on by default: FF34?
behind a flag: Chrome 37
on by default: Chrome 38
Safari 8.1?
picture behind a flag: FF33
on by default: FF34?
behind a flag: Chrome 37
on by default: Chrome 38
Safari 8.1?
Slide 49
Slide 49 text
49
Firefox
(Gecko)
Chrome/Opera
(Blink)
Safari
(WebKit)
IE
(Trident)
srcset (partial) N/A Chrome 34 Safari 8 12?
srcset (full) +
sizes
behind a flag: FF33
on by default: FF34?
behind a flag: Chrome 37
on by default: Chrome 38
Safari 8.1? 12?
picture behind a flag: FF33
on by default: FF34?
behind a flag: Chrome 37
on by default: Chrome 38
Safari 8.1? 12?
Slide 50
Slide 50 text
50
Picturefill by Scott Jehl
!
https://github.com/scottjehl/picturefill
Slide 51
Slide 51 text
Markup
51
Slide 52
Slide 52 text
Markup
52
Device Pixel Ratio-Switching
Slide 53
Slide 53 text
53
Slide 54
Slide 54 text
54
Slide 55
Slide 55 text
55
Slide 56
Slide 56 text
56
Slide 57
Slide 57 text
57
Slide 58
Slide 58 text
58
Slide 59
Slide 59 text
Markup
59
Viewport- and screen resolution-switching
Slide 60
Slide 60 text
60
Slide 61
Slide 61 text
61
Slide 62
Slide 62 text
62
Slide 63
Slide 63 text
63
Slide 64
Slide 64 text
64
Slide 65
Slide 65 text
65
Slide 66
Slide 66 text
66
Slide 67
Slide 67 text
67
NO!
Slide 68
Slide 68 text
68
Slide 69
Slide 69 text
69
Slide 70
Slide 70 text
70
Slide 71
Slide 71 text
71
Slide 72
Slide 72 text
72
Slide 73
Slide 73 text
73
Slide 74
Slide 74 text
Markup
74
File type-switching
Slide 75
Slide 75 text
75
Slide 76
Slide 76 text
76
Slide 77
Slide 77 text
77
Slide 78
Slide 78 text
78
Slide 79
Slide 79 text
79
Slide 80
Slide 80 text
80
Slide 81
Slide 81 text
81
Slide 82
Slide 82 text
82
Slide 83
Slide 83 text
Markup
83
Art direction
Slide 84
Slide 84 text
84
Slide 85
Slide 85 text
85
Slide 86
Slide 86 text
86
Slide 87
Slide 87 text
87
Slide 88
Slide 88 text
88
Slide 89
Slide 89 text
89
Slide 90
Slide 90 text
90
Slide 91
Slide 91 text
91
Slide 92
Slide 92 text
92
Slide 93
Slide 93 text
93
Slide 94
Slide 94 text
94
Slide 95
Slide 95 text
Markup
95
All the things!
Slide 96
Slide 96 text
Markup
96
All the things!
a.k.a. the scary slide
Slide 97
Slide 97 text
97
Slide 98
Slide 98 text
98
Slide 99
Slide 99 text
99
http://whatwg.org/html#the-picture-element
Slide 100
Slide 100 text
100
A better solution:
Serve an appropriate image to
each user
Slide 101
Slide 101 text
1
Improving Performance with Responsive Images
David Newton | St. Michael’s Hospital
Slide 102
Slide 102 text
1
Improving Performance with Responsive Images
David Newton | St. Michael’s Hospital
RESPONSIBLE!
111
Resource Priorities
http://www.w3.org/TR/resource-priorities/
!
Preloading and deferred loading of scripts
and other resources
http://lists.whatwg.org/htdig.cgi/whatwg-
whatwg.org/2014-August/297533.html
Slide 112
Slide 112 text
112
LazyLoad JS scripts and plugins, e.g.:
!
http://css-tricks.com/snippets/javascript/lazy-
loading-images/
115
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
!
Note: Apache is confusing and I’m not guaranteeing this will work.
125
Unoptimized
(Firefox)
Unoptimized
(Safari/iOS)
Load time 2.2s 2.1s
Slide 126
Slide 126 text
▪ Responsive images #1: use srcset and sizes to serve images at an
appropriate size
▪ Responsive images #2: use picture, source, and type to serve SVG and
WebP versions where possible
▪ Optimization: progressive encoding; use ImageOptim and Scour to
optimize file size; serve SVGs gzipped
▪ Deferred image loading: use a modified lazyload.js to defer loading of
images that are below the fold
126