Reputation: 1092
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.
The website http://login.di.se/?appId=di.se&lc=sv
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
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
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