The discussion over how much the Google indexing bot understands about JavaScript comes up over and over. Here are some of the details I’ve been able to put together.
Googlebot is using Chrome 41
On the official Understand rendering on Google Search page the first thing they point out is that the bot uses Chrome 41. Welcome back to 2015, no ES6 for you:
Chrome M41 does not support ES6 features (for example classes). If you are using ES6 make sure to transpile your JavaScript to ES5.
Google Indexing is a Two-Pass Process
Paul Kinlan, a developer advocate at Google, mentioned this process:
Indexing is delayed for pure client side sides. Google indexer is two-pass, first run is without js, then week later it’s with is (or there abouts)
A follow up to that from John Mueller, Webmaster Trends Analyst at Google, notes that this is true for updates as well:
Yeah, there’s no fixed timeframe — the rendering can happen fairly quickly in some cases, but usually it’s on the order of days to a few weeks even. If your site produces new / updated content frequently & you want it indexed quickly, you need that content in the HTML.
The Take Away
Keep your critical, and regularly updated, content in HTML. Keep your client side JavaScript to ES5 or below.