Eliminate render-blocking JavaScript and CSS in above-the-fold content

I have found an error like Eliminate render-blocking JavaScript and CSS in above-the-fold content for my website picobags.co.uk.This may be the cause of Slow mobile speed?

You need to modify your templates and move the Javascript to the bottom of the document.

Can you supply a link to the tools used which display the “Eliminate render_blocking…” error?

If you’re referring to

https://developers.google.com/speed/pagespeed/insights/

IMHO the

Eliminate render-blocking JavaScript and CSS in above-the-fold content

should be a “Consider Fixing” not a “Should Fix”

I suppose the ideal would be 0 loading time, but realistically I think some delay is acceptable and it should be up to the developer to decide how much of a delay is OK

2 Likes

@bluedreamer

You need to modify your templates and move the Javascript to the bottom of the document.

Can you supply a reference?

As far as “lazy-loading” is concerned it is essential to load the relevant JavaScript in the header otherwise the complete page will have to be rendered again once the JavaScript is eventually loaded.

Research concerning the “lazy-loading” technique is ongoing and Google offers a free CDN to web pages and images that comply to their rigorous specifications.

I just tried a recently modified 2.1 MB web page with numerous animated gifs and the results were acceptable.

https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.johns-jokes.com%2Flast-night-i-was&tab=mobile

Edit

Pingdom results are impressive for the 2.1 MB page

https://tools.pingdom.com/#!/ernNI7/http://www.johns-jokes.com/last-night-i-was

1 Like

Sure (should have done that originally!) - https://help.shopify.com/themes/customization

As mentioned before I think some JavaScript files are necessary in the header and will maybe cause a page refresh if the JavaScript files adjust the previously rendered content.

1 Like

I think that’s the definition of render-blocking JS, though, isn’t it? It’s those scripts which are not required to render the page, and therefore should be moved to the end. (Hence the warning doesn’t say “move all JavaScript to the bottom of the document”.)

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.