Talk about frontend performance on the web. Awesome figures, pillars of performance, some terminology, 12 quick wins and couple of web sources to continue your endeavor.
10. PILLARS OF PERFORMANCE
Server Side Rendering
Asset delivery
Client bandwidth
Client CPU cycles
16.03.2019 Performance 10
11. SERVER SIDE RENDERING
Write fast code
Cache what can‘t be made fast
Consider stuff older than 5 sec static
Performance is design
OP-TI-MIZE
16.03.2019 Performance 11
14. CLIENT BANDWIDTH
3G is broadband
Company culture: One day of 2G per month
Ship less HTML
Ship less CSS
Ship WAY less JS
OP-TI-MIZE…. Pretty please
16.03.2019 Performance 14
21. 1 SET GOALS
First Meaningful Paint < 1 sec
Time to Interactive < 5 sec (on slow 3G)
Time to interactive < 2 sec (repeated visits)
16.03.2019 Performance 21
22. 2: CRITICAL CSS
Max Budget: 14kb
Include in <head>
Consider click through
Bloat Budget: 15%
Stay < 170kb textfile-size (compressed)
16.03.2019 Performance 22
23. 3 LOAD LIGHTLY
Trim
Defer
Lazy-load
Use lightweight alternatives
Minimize 3rd party scripts
16.03.2019 Performance 23
24. 4 LEGACY LOADING
Load core scripts normally
Use <script type=„module“> for modern
browsers
16.03.2019 Performance 24
25. 5 CSS GROUPING
Load blocking JS before blocking CSS
Split up critical CSS per media query
Measure
Experiment
Repeat
16.03.2019 Performance 25
27. 7 WEBFONTS
Seriously consider system fonts
Remove bloat subsets
Remove bloat charsets
Make use of font-display
(swap/ optional)
16.03.2019 Performance 27
28. “CHANGING THE WAY
FONTS WERE LOADED
[…] RESULTED IN THE
SPEED INDEX DROPPING
BY 50% FOR 4G
MOBILES.“
GOV.UK
16.03.2019 Performance 28
29. 8 OPTIMIZE IMAGES
Use webP
Optimize image size per viewport
Bootstrap package can help here
dreistrom.land‘s Image Rendering Service
for lossless compression and convertion to
modern images formats
16.03.2019 Performance 29
30. 9 HEADERS
Set HTTP Cache headers properly
Set HTTP security headers properly
16.03.2019 Performance 30
31. 10 COMPRESSION
Use Brotli
Use Zopfli
Use at least gzip
16.03.2019 Performance 31
32. 11 HTTP/2
Serve via HTTP/2
Verify HPACK compression is available
Monitor mixed-content warnings
Enable OCSP stapling
^^ speeds up TLS handshakes
16.03.2019 Performance 32
33. 12 SERVICE WORKER
Use service worker cache for
… webfonts
… CSS
… JS
… re-used images
16.03.2019 Performance 33