~/talk

Unused CSS code: identification and clean up

Talkat CSS-Minsk-JS 2018 · 2018-09-21..09-22· [web-performance, developer-experience]
links:none on file
slides:none on file

Booking.com finds ~50K CSS selectors across pages and cannot rely on static analysis or manual testing across ~2K scenarios, so it builds in-browser CSS coverage via crowdsourced sessions: inject stylesheet text to bypass cross-origin limits, test selectors during idle time with requestIdleCallback and a setTimeout fallback, batch reports via service workers, normalize selector order, and handle third‑party rules. Removal of ~5k page‑specific selectors saves 85KB gzipped, speeds first paint ~120ms, and is validated with A/B testing.

AI-written summary · about

  1. 0:00Introduction to unused CSS
  2. 3:17Why unused CSS matters
  3. 8:15Impact on developer experience
  4. 12:31Crowdsourced CSS coverage approach
  5. 18:37Testing selectors efficiently
  6. 21:27Challenges in data collection
  7. 25:04Results of unused CSS identification
  8. 28:48A/B testing clean CSS
  9. 31:20When to address unused CSS
  10. 32:54Q&A on CSS cleanup
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.