When I run certain PVII sites through the Mobile compatibility tests online (such as Google), why do some keep saying "Failed due to JavaScript before page load"? Where else would it go but inside the Head tags?
JavaScript placed in Head tag
(7 posts) (2 voices)-
Posted 3 months ago
-
These test can be very page-dependent. It's best to have a look at the actual page you are testing, can you provide a link please?
Posted 3 months ago -
These test can be very page-dependent. It's best to have a look at the actual page you are testing, can you provide a link please?
Gerry,
Here is the latest one I was checking. It is only a simple 3-page site so far, but Google says it fails due to JavaScript positioning and text too small?
I expected the larger JPEG to trigger something.
Posted 3 months ago -
The Google Lighthouse audit shows your page gets 98% for Performance and 95% for Accessibility. This is actually a very, very good score.
Can you post, or send, your Google results that show the failure and text issue?
Posted 3 months ago -
Gerry,
I must be losing my mind? I either cannot find the same Google test page or the results on that page have changed? Not seeing any problems there now? I see no "score".
I do see when I run the test here: https://ready.mobi - that it does show the JavaScript issue as a major failure (top of the list)?
I can't seem to get the small text error message to show up now?
Posted 3 months ago -
I would most definitely question the results from the mobi.ready test... I would not use them, instead rely on the results from Google Page Speed and Google Mobile Friendly:
You gets gets very high marks, no issues that need to be fixed. The Page Speed results also include recommendations to make the page even faster, usually they always suggest moving ant render-blocking resources so as not to affect page loading and processing speed. This is where they always recommend deferring JavaScript and other render blocking resources. It's a general recommendation you will see in all of these types of test. It's important, however, to remember that this is only a recommendation. Many scripts cannot, and should, be deferred since the page will become non-functional until the scripts run... an even worse outcome.
When you look at the source of the render blocking, a total of 1.37 seconds, you see that the majority of the delay is the link o the Google font: 780ms. This is the largest comp9onent of the render blocking.
Again, your site is testing very well, I see no reason to change anything.
Posted 3 months ago -
Gerry,
Thanks for the clarification. Everything you state makes perfect sense. I will incorporate your suggestions!
Posted 3 months ago
Reply
You must log in to post.