Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
158
rated 0 times [  159] [ 1]  / answers: 1 / hits: 16860  / 6 Years ago, tue, march 27, 2018, 12:00:00

Instead of directly linking to the Font Awesome CSS, I am using the js from Font Awesome CDN to allow async loading of the icons on the homepage but Google's Pagespeed Insights still marks it as a render-blocking js.



I am using the custom js link provided by Font Awesome CDN and putting it in the <head> section (I could put it towards the end of the <body> also but thats where Font Awesome CDN asks me to put it).



<script src=https://use.fontawesome.com/mycustomcode.js></script>


And yes, I have turned on Async loading by logging into my account on Font-Awesome-CDN.


More From » css

 Answers
9

As mentioned in @GramThanos's comment, everything inside the <head> is render-blocking. Font-awesome CDN makes the CSS load asynchronously which does speed it up but Google would still see the JS as render-blocking.



Moving the JS near the end of the <body> helped it to not be render-blocking and also get rid of the PageSpeed Insights warning.


[#54841] Saturday, March 24, 2018, 6 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
darrell

Total Points: 109
Total Questions: 113
Total Answers: 113

Location: Zambia
Member since Sat, Oct 31, 2020
4 Years ago
;