Pagespeed Insights - Eliminate Render Blocking Javascript?

Hi!

I am trying to increase my page speed ranking and on google page speed insights the only "should be fixed" issue that comes up now is:

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

Your page has 10 blocking script resources and 2 blocking CSS resources. This causes a delay in rendering your page.

None of the content on your page could be rendered without waiting for the following resources to load. Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML.

Does anyone know how would I be able to know which of these resources I can defer or asynchronously load without affecting my site? And which file I need to modify to be able to defer or asynchronously load these resources? Is it then just to add a script in the header like ?
My page speed ranking varies between 77-79 and it would be great if this could make it improve further!
Hope someone can give me some advice!

Thank you!

Page speed insight report from google:

Remove render-blocking JavaScript:

Optimize CSS Delivery of the following:

What version are you running? This was addressed in V4.3.3

I am already running version 4.3.3. still only get 79 on desktop and 64 on mobile.

A number of your scripts seem to be from external sources (I.e. not cs-cart distributed). I would guess they are from some addon(s) you are using. You should contact the developer and have them ensure that they are conforming with cs-cart V4 methodology related to JS.

Thank you for your answer.

Investigating a little bit I found that the 6 latter js scripts above are all related to my theme. All I need to do is to either add async or defer the loading of these scripts to the html code if I am correct? I think I would be able to fix it myself if I only knew where to access that part of the code, any idea where or how I might find it so I can add these little tweaks?

Also I dont need two of them, e.g. the jquery.parallax, since I am not using it anywhere on my page anymore. Can I then just remove it from the code to prevent it from loading?

Thank you again.

I found it myself in design/themes/MY_THEME/templates/common/scripts.tpl.

after commenting out two scripts that aren't in use I'm left with this code, all of these scripts have been identified by google:


{script src="js/megnor/custom.js"}
{script src="js/megnor/scrolltop.min.js"}



{script src="js/megnor/waypoints.min.js"}
{script src="js/megnor/inview.js"}

Only problem now is that if I try to modify e.g. {script src="js/megnor/waypoints.min.js"} to {script async src="js/megnor/waypoints.min.js"} I get a service unavailable.

Any idea what I'm doing wrong or what I can do to include async or defer?

Thank you.

We suggest you to contact theme developers and ask them to fix this issue. Hope they will find a reason much faster and fix the issue for you

Thanks. I contacted the themedevelopers and I am now left with 3 js scripts (small sizes) instead of 6 caused by the theme which is good.

However, I am struggling to figure out where the other ones are coming from. these are the remaining blocking js scripts:

- http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js (203.6KiB)

- http://www.mydomain.com/var/cache/misc/assets/js/tygh/scripts-7aa561045b02a010d6e859a0543816cd1441370885.js?t=1441371054?ver=4.3.3(156.8KiB)

- http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js (83.3KiB)

as you can see they are quite large files also so if i managed to async, defer or remove these it would hopefully affect my page speed alot! Does anyone have any idea where to look or which add-ons or functionality might be using these js scripts?

Thanks again!

Simen

We faced similar issue with one of our client. If I check page source code, I can see that all js files are included at the bottom. But Google Pagespeed says that they are included at the top for some reason

Always makes me smile when people just assume google is correct, have you seen the state of their search engine ? :-)

I wouldn't rely on anything google application to deliver the correct results and I certainly wouldn't change my site to suit their needs. Their ranking almost certainly doesn't rely on speed to the degree that you need to change coding.

hello

I have the same problem.

I have a 4.3.5 a dedicate server and the speed is very low

I try everything and nothing…the website is www.zenon.ro

The page is charging very very low… :(

disable searchenize and your facebook integration and see if your problem improves.

I try but nothing, i have 15 sec speed….:(

I don't see 15 seconds from here. I see a couple of seconds spent in each of:

searchinize, facebook and your page tracker. Look at the output from the browser inspector to see where your time is being spent.

I try but nothing, i have 15 sec speed…. :(

First visit is about 15 sec, I agree. Did you try to temporary switch to the default theme and check the result?

First visit is about 15 sec, I agree. Did you try to temporary switch to the default theme and check the result?

you right :) is the theme….

in that situation, what to do, to give up the theme for another theme?

you right :) is the theme….

in that situation, what to do, to give up the theme for another theme?

At first, try to contact theme developers and ask them to examine the issue