3

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
  • 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 '21 at 18:22
  • 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 '21 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 '21 at 19:32
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.

3
  • 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 '21 at 15:47
  • Why wouldn't you want to use jQuery these days? It's syntax sure beats the native JS syntax for DOM access. Nov 29 '21 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 '21 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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