On July 18, Google added a JavaScript SEO basics section to its Search developer’s guide. It includes general descriptions of how Google processes JavaScript as well as some best practices.

Not only is there an overview of how Googlebot crawls, renderers and indexes JavaScript web apps, the guide provides basic tips, which are accompanied by links to more detailed Google resources, including:

  • Describing your page with unique titles and snippets. JavaScript allows SEOs to set or change titles and meta descriptions.
  • Writing compatible code. Developers should be aware of Googlebot’s API and JavaScript limitations.
  • Using meaningful HTTP status codes. The status codes inform Googlebot that a page has moved, or that it shouldn’t be crawled or indexed.
  • Using meta robots tags. Google states that using JavaScript to remove or change the robots meta tag may not work the way you expect it to, explaining, “Googlebot skips rendering and JavaScript execution if the meta robots tag initially contains ‘noindex’. If you want to use JavaScript to change the content of the robots meta tag, do not set the meta tag’s value to ‘noindex’.”
  • Fixing images and lazy-loaded content. Google recommends using lazy-loading to increase performance and decrease bandwidth costs.
How Googlebot processes JavaScript. Image source: Google Search developer’s guide.

SourceGeorge Nguyen