Googlebot JavaScript Crawling
The cluster discusses Googlebot's ability to crawl, render, and index JavaScript-heavy websites and SPAs for SEO purposes, including its limitations, execution reliability, and solutions like prerendering or server-side rendering.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Doesn't Google's crawler run JS these days?
Google crawlers do index javascript now as many people have already pointed out.The other common practice is to use a "prerender" server which uses a tool like phantomjs to render the HTML of the page. When googlebot or any other robot hits your http server, you check the useragent, and if it matches known robots you forward the request to prerender instead of your app server.
You should be able to help googlebot index the right content by using different HTTP status codes in the response. Also, although googlebot executes JS, in my experience it doesn't use it for indexing content. My guess is that it's primarily used for the instant preview and for verifying that you're not cheating by hiding SEO keywords on load or whatnot. This could change any day, of course.
I kinda wish Google would not index JS rendered stuff. The world would be so much better.
Googlebot can render with javascript now, so why do we still need SSR for SEO?
Google renders JavaScript when it crawls.
Google crawls Javascript sites, but it doesn't execute AJAX calls so most SPA's still won't be crawlable by Google.
This is good-one of my current projects for a customer is entirely AJAX/JS rendered and we were worried that Googlebot would have a fit with it.
Not really, Google and Bing will read the page correctly with Javascript. Check the page insight: https://developers.google.com/speed/pagespeed/insights/?url=...But it would be even better if they could get the information directly on JSON. So much carbon saved ;)
One solution is to detect Googlebot and render the page server-side in a headless browser, and send the generated HTML instead of the full JS app. You could even cache the generated HTML to S3 to speed up pageload, which Google likes.If you use Node...http://zombie.labnotes.org/http://prerender.io/http: