bengarves.com/work/load-strategy-research
Load Strategy Research
[SEO-40] Spike: Mitigate Noto Sans Font
From Ben Garves’s work at Udemy. Re-created from the original document, with people’s names, internal links and non-public numbers removed or generalized.
SpikeSEO-40
- Company
- Udemy
- Created
- Resolved
- Status
- Done
- Type
- Story (spike)
- Priority
- P1 - High
- Story points
- 3
- Project
- SEO Squad
- Sprints
- SEO Sprint 2, SEO Sprint 4
- Linked issue
- SEO-87, “Generate Noto Sans JP …” (Done)
- Requirement source
- Engineering
A spike to keep the Noto Sans font, a 981 KB file because of the Japanese characters it supports, while sparing most visitors the download, by weighing unicode-range subsetting, content- or language-based loading and lazy loading, ending in follow-up tickets.
- Page performance
- Web fonts
- Core Web Vitals
- Localization
User story
As a non-Japanese-speaking user, I’d like Udemy to mitigate use of the Noto Sans font so that pages are 981 KB lighter when I try to load them.
Background
Currently, page load across dotcom includes the Noto Sans font, which is a large file (981 KB) due to the 50k-plus characters needed to support the Japanese language. Because the majority of page loads don’t include Japanese characters, we’d like to look at options that keep Noto Sans, but mitigate the file size for most users. Early thoughts would be that we could do both:
- Unicode range subsetting (with
font-display: swapandunicode-range) to only load Katakana, Kanji, or Hiragana (or any combination of the three) based on page content, which could downsize the file size - Conditional loading based on page content to hold back the font if a page doesn’t have Japanese characters
- Loading based on user language preference
- Lazy load for below-fold content
Acceptance criteria
- Follow-up tickets created for work to mitigate the size of the Noto Sans font