Google has made a concerted effort to treat JavaScript content just like plain old HTML over the past few years.
The search engine updated the Googlebot crawler to the latest version of Chrome to give it the same capabilities as the Chrome browser so that it can read and understand JavaScript.
Not only that, Google continues to improve their parsing performance so that JavaScript-rendered content can be understood and displayed in SERPs almost as quickly as plain HTML — and they continue to update information on the Google developer website.
We tested Google’s JavaScript capability using a new feature in the seoClarity platform that allows updates to quickly be made to web pages.
The short answer is, yes! Both Google and Bing have increased their ability to understand JavaScript content.
Using Google Search Console URL Inspect, you can fetch and render the changes immediately. Google offers detailed and frequently updated documentation on JavaScript.
Recommended Reading: Dynamic Rendering and SEO: How to Help Search Engines (and Users) on Your Website
Google will pick up and display your titles, meta descriptions, H1, content, links, FAQ, and more.
Here are a few more detailed examples …
Yes. We tested title tags replaced by JavaScript-generated text and found those titles via search in the Google SERP.
Google, however, still has a tendency to rewrite them to better match the user’s query.
Recommended Reading: Optimize AngularJS SEO for Crawling and Indexing Purposes
Yes. We tested meta descriptions replaced by JavaScript generated text and found those as snippets in Google search results. Like page titles, Google sometimes rewrites them to match a user’s query.
Absolutely! We have a client that was impacted by Google title rewrites, where terms that were important for CTR were removed.
Using JavaScript updates to their existing H1 tags, they were able to get those terms back into the Google rewritten versions of their SERP titles.
Yes. We placed text using JavaScript on product category pages to increase relevance. And, we even replaced the entire body of a web page with JavaScript generated content and found those pages via Google search querying for terms within the new content.
Yes. Google treats these links just as it would links in HTML. To test this, we created a series of pages, all linking to the next page via JavaScript-generated links.
In this test, we created a hierarchy of 5 pages and the only links to them came from our initial test page, then each linked to the deeper page.
It took a few weeks, but all of these pages were found in the Google index, ranking for unique text contained on the page.
Yes — and even extremely lazy-loaded content. We tested loading content on a 5 second delay, then updated that content via JavaScript.
We found that Google chose to display the updated content as the Google snippet. We’re currently testing just how lazy the text can be. Stay tuned for those results!
Yes, quite well. Structured data generated using JavaScript appeared within 7 days for a website already ranking for their top keyword.
Yes. In our tests we published pages and allowed them to live in the Google index for a month. Then, we created a meta robots tag to “no index” the pages.
Within a week of their next crawl, the pages disappeared from the index and have not reappeared after several weeks.
Changes appear on an average of 5 days once crawled.
Not at all. Cloaking is a sneaky tactic where you show the search engine bot a different version of the page that you show to users. In all of our use cases, we show the exact same content to both the users and search engine bots.
We have more tests in progress, as we strive to test the limits of the ever-increasing capabilities of Google and other search engines. Check back often or subscribe below to get the latest results.