@pzsniper Looking over the site source I see the fontawesome script added twice. That yellow message is not an error, but a warning which says the preload element is not used in a few seconds after it was loaded.
If you want to use external link: try clearing one of the fontawesome script tags from html, add defer. If you want to use localization: remove the preload for https://kit.fontawesome.com
Hi, thanks for your reply. I appreciate your time, but forgive me. What you wrote makes no sense. I haven’t activated anything except adding the line I showed you earlier to the Yootheme settings. Look here: https://prnt.sc/Ib7V18JX3_DX
because the JS file was not successfully or correctly fetched form awesomefont.com , it has some kind of restriction and access policy prevent from doing so.
@pzsniper I looked at the original HTML( added parameter ?LSCWP_CTRL=before_optm to url ) and I see you changed it and no double <script src=”https://kit.fontawesome.com/1daaf3b994.js” crossorigin=”anonymous”></script>
At that moment, I double check, to make sure I searched for the correct thing. From what I see the message about usage disappeared. I can see the error now on site(in footer, social section), but the problem appears to be from CSS: the icons are missing :before element, that is loading the icon. There could be some settings that we can test: – disable both UCSS and Load CSS Asynchttps://docs.litespeedtech.com/lscache/lscwp/pageopt/#load-css-asynchronously (one by one) And see if this will fix the issue. – CSS minify By doing this we can narrow down where the problem comes from.
MAYBE.. if i download a local copy and host the FontAwesome js this cloud be a good idea? Download Font Awesome Free or Pro | Font Awesome Can i instruct LSCWP to fetch it later? Main goal was to AVOID long loading time and penalization for PageSpeed test after all.
This reply was modified 10 months, 2 weeks ago by pzsniper.
This reply was modified 10 months, 2 weeks ago by pzsniper.
yeah , it won’t work , the localization can not fetch the awesomefont.com files as it doesn’t allow its files to be fetched like that , this part need to improvement to handle such case
well , at this moment I think only manually grab and place the file , and even only get that JS file may not be enough , it would subsequently loads branch of fonts need to localized as well
Idk i’m close to give up… i have tried to follow this guide Install Manually | Font Awesome Docs and putting it into my child theme functions.php pointing to yootheme-child/js/all.js but did not worked anyway…
Ok i will accept that load penalization and will put back the cloud link inside my theme.. so sad… š
Anything i could optimize to get better pagespeed results in LSCWP settings please? It destroy my load time https://prnt.sc/DPVUEXSRy5XY
This reply was modified 10 months, 2 weeks ago by pzsniper.
i cannot, since after our testings i have read the official documentation and chose to add it to functions.php this way
/** * Font Awesome Kit Setup * * This will add your Font Awesome Kit to the front-end, the admin back-end, * and the login screen area. */ if (! function_exists('fa_custom_setup_kit') ) { function fa_custom_setup_kit($kit_url = '') { foreach ( [ 'wp_enqueue_scripts', 'admin_enqueue_scripts', 'login_enqueue_scripts' ] as $action ) { add_action( $action, function () use ( $kit_url ) { wp_enqueue_script( 'font-awesome-kit', $kit_url, [], null ); } ); } } } fa_custom_setup_kit('https://kit.fontawesome.com/1daaf3b994.js');