Explore a better font loading mechanism
mazipan opened this issue ยท 4 comments
Description
One of our problematic loading in initial load is our Inter Font
There are several things need to tackle:
- Since font are rarely change, should we treat as static file without
hashing
? Hashing will remove the cache in every deployment. - Find a way how to preload this request, since it will be used immediately so we need to preload the request.
Tasks
- ...
- ...
- ...
I can work on this.
My solution is to replace typeface-inter
with self-hosted font (yes as a static file) and then Cache-Control
via netlify.toml
also we can use Inter variable fonts used by vercel here (https://vercel.com/design/text) it's smaller only 38kb
https://assets.vercel.com/raw/upload/v1587415301/fonts/2/inter-var-latin.woff2
reff:
Nice, sounds good. Please proceed with this approach, @svspicious. Create a draft pull request and add a need-perf-check
label on the PR to trigger the Lighthouse CI check on the changes and see its impact on the performance.
Can you help me to add the label mas @zainfathoni ?
Can you help me to add the label mas @zainfathoni ?
Done. Let's wait for the result now.