When does Googlebot execute javascript?
Asked Answered
W

4

15

I have a few single page web apps on multiple domains that heavily rely on javascript/ajax to fetch and show content. Based on logs and search results I can tell that googlebot runs javascript on some of the domains but not on others. On some it indexes everything thats only available with js on others it doesn't even seem to run js at all.

Can anybody tell me how googlebot decides what js to run and if I can to anything to get it to run js on my other domains?

PS: I know that normally I should use something like serverside rendering for this, but I'm not at all depended on search results and rankings, so its not really worth the effort. I'm just curious how googlebot decides whether it should run js or not and if there's anything easy I can do to change that on my other domains.

Wonderstricken answered 23/3, 2014 at 8:42 Comment(5)
Check this question, could have a link to info you need: #2062344Midwife
@Midwife Yes, I've already read that earlier, but my apps heavily depend on js execution in general not just ajax requests. And I'm just curious how googlebot decides on which pages/domains to execute js. All my webapps are very similar in structure and design, yet it executes everything on some and nothing on others. The google webmasters "Making AJAX Applications Crawlable" guide only talks about making ajax urls easier for googlebot to understand, but I couldn't find anything about the general js execution anywhere.Wonderstricken
Generally speaking, Google keeps all the 'how' secret to prevent abuse or giving the competition ideas. I do not think it is likely that you will find an answer. But I will follow this post, just in case :)Midwife
This question appears to be off-topic because it is about SEOFichte
Google posted to their blog about this two months after this question was asked - googlewebmastercentral.blogspot.co.uk/2014/05/…Ubana
A
5

You can learn more about how Google render ajax based website and a list of best practice directly from Google developer website here:

https://webmasters.googleblog.com/2014/10/updating-our-technical-webmaster.html https://developers.google.com/webmasters/ajax-crawling/

Regarding your specific problem as first thing, I suggest you to analyse each domain using Google Webmaster tool with functionality "Fetch as Google" and go trough every technical aspects mentioned in Google guide.

https://support.google.com/webmasters/answer/158587?hl=en

Arthur answered 9/7, 2014 at 7:10 Comment(1)
Does using Google's Webmaster Tools index your website? I want only to test the page, not to index it. It's a website in development and should be released soon, so I want to do some tests before deploying. I am afraid that if I add it to Google's Webmaster Tools, it will start crawling and indexing.Cyril
U
2

I think Google Updated Research on the Subject http://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157

Unrefined answered 21/1, 2015 at 9:0 Comment(0)
W
0

Now the functionality to fetch your page by Google Bot and see the results has moved into Google Search Console.

You can use URL Inspection Tool to analyze your live URL.

I've tested it on AngularJS App and Google Bot was able to crawl page content with data fetched from AJAX request.

Whitlow answered 10/4, 2019 at 11:31 Comment(0)
V
-2

One very important restriction is that the Googlebot does not allow AJAX requests while the page is loaded.

In my blog post I am explaining how to adapt a Single Page Application so that it becomes crawlable – without the need to render HTML snapshots on the server.

Varia answered 12/1, 2015 at 10:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.