3 ms·
I'm not sure if this is undocumented, but I've noticed that submitted links sometimes have either the pathname or search parameters portion of their URL truncat
by aragonite 3y ago
I'm not sure if this is undocumented, but I've noticed that submitted links sometimes have either the pathname or search parameters portion of their URL truncated or stripped entirely. Sometimes the truncation happens after a slight delay.
For example, if you try to submit a link to a particular Google Books page, say the one I just tried:
https://www.google.com/books/edition/The_Albert_Einstein_Collection_Volume_On/XdTkDAAAQBAJ?hl=en&gbpv=1&pg=PT102 https://www.google.com/books/edition/The_Albert_Einstein_Col...
the link will remain intact for a short while before losing its search parameters and turning into a link to the book itself rather than to a page in it.
- Jtsummers 3y agoPossibly canonical links. HN looks at the submissions and updates the links to the canonical link if present. I'm on mobile so not able to double check the Google books page at the moment, but if you view source check to see if there's a canonical link in there. This also bites some blogging sites that end up with a canonical link to their base http://blog.example.com http://blog.example.com on all their posts. https://en.wikipedia.org/wiki/Canonical_link_element https://en.wikipedia.org/wiki/Canonical_link_element
- aragonite 3y agoJust checked and you are exactly right (it's not in the raw source but the element is found in the DOM tree). This explains the delay also!
- dang 3y agoJtsummers's answer is correct, but we turn off canonicalization for some classes of URLs and I think you've found a good example of that. I've exempted Google Books links for the future and put your submitted URL back in https://news.ycombinator.com/item?id=38774261 https://news.ycombinator.com/item?id=38774261.
- aragonite 3y agoThanks dang!