suggestion add link rel preload
-
It would be better for performance and appearance, so it won’t flash font
i made a snippet like this
add_action( 'wp_head', function () { ?> <link rel="preload" href="/wp-content/uploads/useanyfont/xxxxxxx-l.woff2" as="font" type="font/woff2" crossorigin> <link rel="preload" href="/wp-content/uploads/useanyfont/xxxxxxx-l.woff" as="font" type="font/woff" crossorigin> <link rel="preload" href="/wp-content/uploads/useanyfont/xxxxxxx-m.woff2" as="font" type="font/woff2" crossorigin> <link rel="preload" href="/wp-content/uploads/useanyfont/xxxxxxx-m.woff" as="font" type="font/woff" crossorigin> <?php } );
but would be nice if made native into the plugin (you could also put it as optional in settings if you prefer
google pagespeed and webvitals both take it an error loading a font without preload
thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘suggestion add link rel preload’ is closed to new replies.