4

I am using Google Search Console's "Test Live URL" function to see if Google crawler can correctly read my pages. I find out that for a single page 3 out of 5 tests will return a lot of JavaScript errors, none of these errors shows up when I browse my page using a normal browser.

enter image description here

For the rest of the tests there were also some minor JavaScript errors. The crawler seems not loading all of the JavaScript files and every time what JavaScript files will be load is different.

My page relies on jQuery to render most of the contents. When Googlebot fails to load jQuery, it will be getting a broken page.

Is this the normal behavior of Google crawler or did I miss something?

3
  • 1
    If Googlebot can still properly render your content despite the errors (check the "screenshot" tab), then I wouldn't put too much stock in the errors. If the screenshot looks broken though, I would consider that more of an issue. Nov 22, 2021 at 18:22
  • 1
    Also, do these same errors show in your browser's JavaScript console when you visit the page? It would be helpful to rule this out as an issue inherent to your website rather than an issue with Googlebot. Nov 22, 2021 at 18:23
  • 1
    No these errors don't show when I browse my site. And yes when the javascript files are not loaded, Googlebots are getting a broken page. Question updated.
    – Wen Shenk
    Nov 22, 2021 at 19:32

2 Answers 2

1

The Mobile Friendly Test has limited time

After a certain amount of time the Mobile Friendly test is forced to stop. When this happens, any resources that are not fully loaded/transferred are listed as errors.

Sometimes these are listed as "Error" or "Other error". This doesn't mean that you have a rendering issue. It just means that the test is not perfect.

While I consider this normal behavior for the Mobile Friendly Test. We still want to know why it's taking so long that the test times out.

In my experience this most often indicative that there are greater performance issues.

So what could be the problem?

By contrast, WebPageTest is willing to sit around and wait for your site to load even if it's very slow. Using it we can see what's really going on.

enter image description here

enter image description here

On first view your site makes 146 requests. That's a lot. There are much bigger problems than whether or not you should be using jQuery. Look how many of these resources are render blocking?

So your answer is really to optimize your site's speed and performance overall. While it will be quite the undertaking to optimize, there's a lot of low hanging fruit that can help a great deal.

I'd be happy to recommend where you should start but that's outside the scope of this particular question.

0

Looks to me like a result of some kind of, maybe unintended, but cloaking.

However, it's 2021. Almost 2022. Why would anyone still be using JQuery?

You have two options here, basically:

  1. Dig into those errors and start doing real JS debugging. Looks like the main issue is that the JQuery library is not being served when the rendering relies on it (one of the reason not to use it at all, btw).
  2. Change your theme/engine/plugins/configs until you get rid of these rendering issues.

When I go to the site, I do see some odd issues in the console: enter image description here

But they would need to be debugged from the code side.

5
  • Very odd that I can't edit my answer. It gives me a 404 when I try. Well, I just wanted to add that maybe the way the library is served should be changed. maybe load it directly and explicitly from a source that doesn't discriminate. There may be a firewall issue on the server that serves the library, so it blocks requests from certain IPs/countries.
    – BNazaruk
    Nov 29, 2021 at 15:47
  • 1
    Why wouldn't you want to use jQuery these days? It's syntax sure beats the native JS syntax for DOM access. Nov 29, 2021 at 16:27
  • Very simple: you don't add a huge (and slow) front-end dependency for syntax. Use gulp/typescript/etc for syntax.
    – BNazaruk
    Nov 29, 2021 at 16:29
  • I'd think that most users come to a site with jQuery in their cache Jan 31, 2022 at 15:51
  • Well different jquery versions entail different caches, so now users have to carry tons of different front-end variables with them whenever they go? Well, that may explain why Chrome eats so much ram.
    – BNazaruk
    Jan 31, 2022 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.