Google’s Martin Splitt continues his series on JavaScript SEO, focusing on situations when JavaScript should be a concern and when it isn’t necessary to worry about it.
According to Splitt, SEOs only need to be concerned with JavaScript if they’re working with a “JavaScript site.”
### What is a JavaScript site?
Not every site that uses JavaScript qualifies as a “JavaScript site.” If all the main content can be accessed without loading JavaScript, then there’s nothing to worry about. However, if JavaScript is needed to display essential content, then you’re dealing with a “JavaScript site.” Another example of a JavaScript site is a single-page app, such as Instagram on a mobile browser. In this case, the header and footer are static, while JavaScript is used to load the main content. JavaScript frameworks like Angular and React often operate as single-page apps.
### When is JavaScript relevant for SEO?
JavaScript becomes significant for SEO when it is used to dynamically load or change important content. Ideally, Googlebot should be able to access all content on a page, even the parts added dynamically by JavaScript. If the page source reveals all critical content, then JavaScript doesn’t impact SEO. However, if only part of the content is visible in the page source, it will be indexed initially, while content requiring JavaScript rendering will be indexed later. Splitt has previously explained these two waves of indexing and plans to explore improving JavaScript rendering in future episodes.