OBTW @RGJ, sorry for the confusion about “not current”…
When I use the term “dated” or “not current” I am talking about concepts and ideas, not the physical date of any article.
Some people write articles with dates from “today” and the concepts are “dated” (and wrong) and some people have written articles from 10 years ago, which are still highly relevant today.
That is what I mean by “dated” or “not current”, it is based on “concepts” not physical dates written on paper or a web article. Sorry for any confusion in my reply using the terms in this manner.
What is important, at least in my mind, is that we provided a solution for @KranthiKiranGude and he confirmed it works and based on your skeptical post, we both did some additional research for this issue.
We verified (1) that this method, changing the canonical link using Javascript, is valid; and that (2) Google developers have confirmed it; and (3) we have a way to confirm it as users, using the URL Inspection Tool (as @KranthiKiranGude used and shared with us).
All the best and thanks so much for the “back-and-forth” on this interesting topic and for helping make the solution even more valid and stronger.
I’m off to other tasks (still struggling to learn Ruby on Rails after over a decade of PHP coding) ; as this topic is fully “mission accomplished” ![]()
Until next time… all the best!