Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sorry but this is legitimately a terrible way to encode this data. The number 0.8 is encoded as base64 encoded ascii decimals. The bits 1 and 0 similarly. URLs should not be long for many reasons, like sharing and preventing them from being cut off.


The “cut off” thing is generally legacy thinking, the web has moved on and you can reliably put a lot of data in the URI… https://stackoverflow.com/questions/417142/what-is-the-maxim...


Links with lots of data in them are really annoying to share. I see the value in storing some state there, but I don’t think there is room for much of it.


What makes them annoying to share? I bet it's more an issue with the UX of whatever app or website you're sharing the link in. Take that stackoverflow link in the comment you're replying to, for example: you can see the domain and most of the path, but HN elides link text after a certain length because it's superfluous.


SO links require just the question ID; short enough to memorize.


Sure, but the SO link was just an example. HN does it with any link, like this one which is 1000 characters long:

https://example.com/some/path?foo=bar&baz=bat&foo=bar&baz=ba...

If the website or app has a good UX for displaying/sharing URLs, the length doesn't really matter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: