Botonomy rendering lab
Rendering test, 5 s delay (B): canonical by script
This page is a rendering test run by Botonomy. Its last sentence is added by JavaScript 5 seconds after the page loads. We record whether Google indexes that sentence, to learn how long Google waits for content that appears late. The test runs for 30 days, and the result will be published on this page.
Can JavaScript inject the canonical tag?
It can, and Google says it does not recommend it. This lab keeps every canonical in the HTML.
Google says: “While we don't recommend using JavaScript for this, it is possible to inject a rel="canonical" link tag with JavaScript.”
JavaScript SEO basics, Google Search Central
Reference phrase in this page's HTML: inkhorn warren tansy osier 574.