Under the Google Search Console add a URL to inspect and check what Google has indexed via the “View Crawled Page” link followed by “HTML” tab.
The highlighted code was added via a JavaScript file as part of a JavaScript SEO test to prove Google indexes JavaScript links.
The HTML source code shown in the Google Search Console screenshot does NOT exist in that format on the webpage tested. See the JavaScript SEO test page, view source and you will NOT find the HTML code for the link Google has indexed.
The link Google has indexed was add via a JavaScript file (a js file) which replaces the original content on the fly.
In brief I added some body text to a webpage like this one, created a JavaScript file which searched and replaced that text with a text link.
10 years ago Google would have failed to index JavaScript rendered links, Google would have spidered, indexed and ranked the original text content because it wasn’t advanced enough to ‘see’ what the JavaScript code had changed.
In 2020 Google is on the verge of seeing webpages like we see webpages and in this JavaScript SEO link test we see a text link and Google sees a text link.
Continue Reading SEO JavaScript Links Tests