Voglio aggiornare rel=canonical href usando JavaScript

Yeah, I totally support the idea of Google flattening the DOM contents like that while indexing.

But some/most meta tags have their semantics at the HTTP protocol level rather than at the HTML protocol level, despite the fact that they’re being present in the HTML. I emphasized the ‘while indexing’ because I am not sure it flattens the DOM like that and takes the updated canonical URL into account while crawling.

(To put it differently, I’m not sure if DOM contents also means ‘metadata embedded in the content’. Yes it sees it that way but I’m not sure if it will use it that way).

Maybe this article explains it better: How Google Crawls Your Website and Indexes Your Content

When Google needs to crawls JavaScript sites, an addition stage is required that traditional HTML content doesn’t need. It is know as the rendering stage, which something takes additional time. The indexing stage and rendering stage are separate phases, which lets Google index the non-JavaScript content first

.

1 Mi Piace