Search code examples
reactjssingle-page-applicationgoogle-searchgooglebot

How does Googlebot figures out if a page on a Single Page Application has finished rendering?


Google claims to be able to crawl SPAs. Since SPAs content is generated using javascript on the client-side, how does Google figure out if the page has finished rendering? For example, in a React app, a developer might do an AJAX call in the componentDidMount method, then update the state of the component when the data returns from the server. Is there a way Googlebot figures out when this has happened, or it just waits long enough for it to happen, then index the page?


Solution

  • Googlebot does not wait for the page to finish rendering. According to this article, the bot waits a window of time for the page to load, you can read it to learn more about SEO and single page apps. Since the article is from 2017 there may be changes, but I think it is a good starting point