Khoi Nguyen
Khoi Nguyen

Reputation: 1092

Google pagespeed shows render-blocking even moving into body part

I just checked this website with Google pagespeed Insights, they asked me change the Javascript block into body instead of head even this part has been moved already.

Anyone please help me investigate this problem if Google give me a wrong message, or how to fix the kind of issues.

https://developers.google.com/speed/pagespeed/insights/?hl=en&url=http%3A%2F%2Flogin.di.se%2F%3FappId%3Ddi.se%26lc%3Dsv&tab=mobile

The website http://login.di.se/?appId=di.se&lc=sv

enter image description here

I also have another website with same DOM, however don't have this problem with google pagespeed

http://account.sydsvenskan.se/?appId=sydsvenskan.se&lc=sv

Upvotes: 1

Views: 1447

Answers (2)

Nitish Dhar
Nitish Dhar

Reputation: 2312

Possibility 1

Some content loads at the end of page load i.e giving an illusion that preceding JavaScripts were holding back the content rendering.

I see these two images are called in the end only for the site with issue -

http://login.di.se/public/images/di/background.jpg
http://login.di.se/public/images/di/checkbox_cust.png

You can see this here - http://tools.pingdom.com/fpt/#!/bRcsEc/http://login.di.se/?appId=di.se&lc=sv

But this is not the case for your other website - http://tools.pingdom.com/fpt/#!/cH2ghk/http://account.sydsvenskan.se/?appId=sydsvenskan.se&lc=sv

Alternate Solution - Use Asynchronous Load

Try loading the JavaScript asynchronously as google suggests something like this -

<script async src="my.js">

Refer - https://developers.google.com/speed/docs/insights/BlockingJS

Upvotes: 1

user3036342
user3036342

Reputation: 1045

There is still a huge chunk of JavaScript in your <head>

Also check to see if Cloudflare isn't inadvertently adding JavaScript where it shouldn't

Upvotes: 0

Related Questions