'Stop safari from sharing canonical url
I recently noticed that the safari share sheet sends the canonical url when a user uses it to share a webpage.
Is there a way to overwrite that behaviour via html or some other way?
It really screws a lot of things up...
Solution 1:[1]
What I ended up doing is simply removing the canonical link with a timer after the document is ready with the following simple code:
setTimeout(function(){
document.querySelector("link[rel='canonical']").remove();
},500);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Ant |