March 14, 2023  SEONews

How to Optimize JS for Search Engines


What is JavaScript SEO?

JavaScript SEO is part of technical SEO that focuses on making websites built with JavaScript easier for search engines to crawl, render, and index.

Common tasks include the following:

  • Optimizing content injected via JavaScript
  • Implement lazy loading correctly
  • Follow internal linking best practices
  • Preventing, finding, and fixing JavaScript issues

And others.

please note: If you need to refresh your knowledge on basic JS, read our guide: What is JavaScript and what do you use it for?

How does Google crawl and index JavaScript?

Google processes JS in three phases:

  1. Crawl
  2. Weather display
  3. Indexing

Google’s web crawler (known as Googlebot) queues pages for crawling and rendering.

It crawls each URL in the queue.

Googlebot makes a request. Then the server sends the HTML document.

Next, Googlebot decides what resources it needs to render the page’s content.

This means that it crawls the HTML. Not JS or CSS files because rendering JavaScript requires tremendous resources.

Think of all the computing power Googlebot needs to download, read and run JS for trillions of pages on almost 2 billion websites.

So, Google defers rendering of JavaScript. It queues anything that hasn’t been executed to be processed later as resources become available.

As soon as resources allow, a headless Chromium (Chrome browser without a user interface) renders the page and executes the JavaScript.

Googlebot reprocesses the rendered HTML for links. And queues...



source: https://news.oneseocompany.com/2023/03/14/how-to-optimize-js-for-search-engines_2023031441950.html

Your content is great. However, if any of the content contained herein violates any rights of yours, including those of copyright, please contact us immediately by e-mail at media[@]kissrpr.com.