2 ms·
I 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 b
by krapp 11y ago
I 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.