Preload fonts using LiteSpeed Cache

[ad_1]

Hi,

In this thread, it’s mentioned to use:

RewriteCond %{HTTP_COOKIE} !ls_smartpush [NC]
RewriteRule ^.*$ - [ENV=PRELOAD:true]
Header add Link "</path/to/static/source.woff>; rel=preload;as=font;crossorigin=anonymous,</path/to/static/stylesheet.css>; rel=preload;as=style,</path/to/static/javascript.js>; rel=preload;as=script" env=PRELOAD

I’ve done that using:

RewriteCond %{HTTP_COOKIE} !ls_smartpush [NC]
RewriteRule ^.*$ - [ENV=PRELOAD:true]
Header add Link "https://fonts.gstatic.com/s/montserrat/v26/JTUSjIg1_i6t8kCHKm459WRhyzbi.woff2"; rel=preload;as=font;crossorigin=anonymous,

and it works on our staging website, however, the header loads once, flickers, then loads again.

Is there a way to stop that from occurring?

Also, about 3 years ago, you mentioned “Font preload is on our to-do plan”. Any update on this?

Thanks

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer