Fix Eliminate render-blocking resources
These render-blocking resources could be a font, facebook pixel some CSS or external js file.
First ask yourself do I really need all of these files? And do I need it right away?
Fix Google fonts render blocking A font needs to be loaded right away but there are better ways to load these. You can use Web Font Loader that Typekit and Google created. Here's a snippet.
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
<script>
WebFont.load({
google: {
families: ['Lato:400,600,700,400i,700i']
}
});
</script>
Set timeout for external files If your pages are loaded HTML, CSS and the first couple images are the most importend when loaded. A Intercom chat widget is not that important right away. What you can do is load these after a second or 2. This way your Time to Interactive is way better.
window.addEventListener("scroll", function(){
setTimeout(function(){
// load external files here
}, 3000);
});
Thanks for this tip marketingexamples.com.