3 ms·
>It's a bit silly that the major browsers are all adding in Google-AMP-specific hacks like this, though. Isn't copying the canonical URL the correct behavior?
by SquareWheel 9y ago
>It's a bit silly that the major browsers are all adding in Google-AMP-specific hacks like this, though.
Isn't copying the canonical URL the correct behavior? I've just checked and the AMP page you linked has the correct canonical tag set.
- kemayo 9y agoThere's a debate to be had on that point, I guess. The normal behavior of "share sends the precise page I am currently viewing" has the advantage that you know what you're sending, whereas trusting the website's rel="canonical" opens up some potential confusion. (And, I guess, sneaky attack vectors, though someone who wanted to exploit that could do so easily enough via JS redirects on non-referer visits anyway.) The Google Amp people certainly think that's the right way to do it, as we can see here: https://news.ycombinator.com/item?id=15085159 https://news.ycombinator.com/item?id=15085159 EDIT: Actually, I'm seeing some claims that iOS Safari is just generically doing share-is-rel-canonical now. I haven't tested it personally, but...
- SquareWheel 9y agoI'd say the advantage of share buttons using the proper canonical tag is it strips away user-customizations, tracking information (utms), and other info. So for instance if a user clicks the "comments" link on a blog post, it won't then skip the article when people view it. Though I can also see downsides. For instance you might click on a specific version of a product on an ecommerce site. If you share it and say "I love this version!", that information could be lost in the process.
- kemayo 9y agoI admit, most of my hesitations are in the realm of my not trusting websites to do it properly. :D