Categories

Archives

Back to Blog
An example of JavaScript code on a computer screen.

New Series Provides Greater Insight into How Google Approaches Programming Language

On February 28, 2019, Google’s Webmaster Trends Analyst Martin Splitt announced he would be hosting a regular video series on the Google Webmaster YouTube channel.

This series is dedicated to exploring how JavaScript, one of the most popular and common coding languages on the web, and how it impacts and interacts with search engine optimization strategies and techniques.

Also on the 28th, the first video went live, covering exactly how Google approaches content in JavaScript when it crawls and indexes sites.

According to Splitt, the standard procedure for Google’s crawler when it crawls a webpage is to pass the content it sees onto the indexing stage. When links are detected, the index passes them back to the crawler, which then continues its cycle.

“But what if some of the content is generated by JavaScript? JavaScript requires an extra stage in the cycle, the rendering stage,” said Splitt.

When Googlebot crawls a page and detects JavaScript, it executes that JavaScript while rendering the page. But there’s a catch— “Because this rendering is expensive, it can’t always be done immediately.”

Splitt explained that separating the indexing and rendering stages allows Google to index non-JavaScript content as fast as possible. They can then return to index the content that does require JavaScript later.

Because of the sheer volume of webpages out there, Google defers the execution of JavaScript to get most of the content as quickly as possible.

“But what does that mean for your content? It means that Googlebot can execute JavaScript on your site, but it can take longer for that content to appear or update in search,” explained Splitt.

Google also can’t make guarantees or promises related to the time it takes to render that JavaScript content, either, as it depends on “many different factors.”

Building off this first video, the second in the series covers “JavaScript sites,” sites that use JavaScript not to enhance and augment existing on-page content, but to “modify or add critical content on the page.”

“This is relevant for SEO purposes, as you want to make sure Googlebot sees all the content on the page, including the parts that are being dynamically added using JavaScript.”

Splitt recommended inspecting page source code to make sure that indexable content is visible in the markup. Content that isn’t visible and is loaded through JavaScript will have to wait for rendering and indexing.

Based on these first videos, it’s clear that there’s plenty to consider when it comes to how something as fundamental as code can impact and affect lasting digital marketing strategies.

Splitt will be continuing this series, so it’s worth checking out if you’re a developer or SEO specialist looking for more insight into how these things interact!