perf: preload Poppins 400+700 latin-ext to reduce font swap CLS
Browser starts downloading fonts immediately instead of waiting for CSS parse. Reduces the window between system font and Poppins, which should lower CLS from font-display: swap reflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8f44c11af9
commit
380db6de61
@ -34,7 +34,9 @@
|
||||
<!-- Preload critical resources for LCP optimization -->
|
||||
<link rel="preload" href="{{ url_for('static', filename='img/favicon-512.png') }}" as="image">
|
||||
|
||||
<!-- Fonts - Poppins (self-hosted, no render-blocking external request) -->
|
||||
<!-- Fonts - Poppins (self-hosted, preloaded for minimal CLS) -->
|
||||
<link rel="preload" href="/static/fonts/poppins-400-latin-ext.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="preload" href="/static/fonts/poppins-700-latin-ext.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<style>
|
||||
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap;
|
||||
src: url('/static/fonts/poppins-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user