我发现了很多不同的文章并试图实现它,但是我仍然无法使它工作。
Google pagespeed建议预先加载一些文件,但我无法弄清楚:/
我继续更新了header.php
<head>
<!--custom preload -->
<link rel="preload" as="font" crossorigin="anonymous" href="https://allurehemp.com/allurehemp/assets/css/icons/fl-icons.woff2" >
<link rel="preload" as="style" crossorigin="anonymous" href="https://allurehemp.com/allurehemp/assets/css/fl-icons.css" >
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>
现在我面临以下问题;
A preload for 'https://allurehemp.com/allurehemp/assets/css/fl-icons.css' is found,but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.
任何建议都值得赞赏=)