4 ms·
One of the tricky things (I presume) about detecting Medium links is that they append a custom hashtag to the URL with each individual share, so that they can t
by danso 11y ago
One of the tricky things (I presume) about detecting Medium links is that they append a custom hashtag to the URL with each individual share, so that they can track the "path" of the sharing. So everyone who copies the Medium link from their browser will be pasting a new unique URL into the HN system. Maybe there should be a new rule written for the medium.com domain that strips the hashtag when determining if it has already been submitted?
- krapp 11y agoI wonder whether they shouldn't be stripped by default for everything. It seems like they're hacking what's supposed to be an in-document anchor, so it should be something HN can safely ignore. But that might be too simplistic.
- danso 11y agoI think it'd be easier to do on a case-by-case basis. It'd be too much to predict the effects of stripping out anchors across all sites, because some single-page apps still use that as a way to mark actual endpoints. There are a handful of domains that are repeatedly submitted and have very predictable behavior...nytimes.com and medium.com. Everytime you go to an article URL at nytimes.com, at the minimum, `?r=0` is appended. As far as I can tell, every NYT article has a permalink in which query parameters have no effect to the end user. So writing a rule to strip out query params when testing for uniqueness would probably be of minimal harm. Obviously such a rule would be terrible to apply for all domains...for starters, it would penalize all sites that use the `q=x` type param to query for unique pages, such as PHP bulletin boards.
- krapp 11y agoYou're probably right - I wouldn't even bother trying it with query strings, though.
- cookiecaper 11y agoSticking random fragments in place to avoid dupe detection is a very common tactic. Intelligent dupe detectors should ignore fragments. However, people can also throw in random query string variables and it's impossible to tell if those substantially modify the content without visiting the page itself and comparing.
- DrScump 11y agoIt's not impossible. You can just text match the first X characters of that URL segment and consider it a dupe at that point. I can live with the occasional false positive. gamedevdaily.io uses that tactic.