PageSpeed - Eliminate render-blocking JavaScript for jQuery -


i have jquery added @ bottom of page. however, when run site on pagespeed insights (mobile), error:

eliminate render-blocking javascript , css in above-the-fold content page has 2 blocking script resources , 1 blocking css resources.

this causes delay in rendering page. none of above-the-fold content on page rendered without waiting following resources load.

try defer or asynchronously load blocking resources, or inline critical portions of resources directly in html.

see: http://learnyourbubble.com , https://developers.google.com/speed/pagespeed/insights/?url=http%3a%2f%2flearnyourbubble.com&tab=mobile

however, jquery added @ bottom of page. should below fold.

please me remove error!

this article should explain lot of what's happening: https://varvy.com/pagespeed/critical-render-path.html

in short though problem chrome need load jquery , foundation javascript give initial render of page. why blocking. because javascript comes after html, not mean html can displayed yet. rendering of dom still going block while jquery/foundation being loaded because chrome thinks they're vital page being displayed correctly. pagespeed complains on these particularly because they're large. alleviate problem, there few things can do, of them detailed in article above, of them in here https://developers.google.com/speed/docs/insights/blockingjs. easiest way tell chrome these scripts not vital , can loaded "below fold" add defer or async tag them.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -