Hacker News new | past | comments | ask | show | jobs | submit login

URL fragments are the part after the hash symbol (#) like this:

https://en.wikipedia.org/wiki/Donald_Trump#Books

the original use case (still used today) is to be able to jump to the first DOM element with such an ID; typically title elements, such as the "Books" above. It is only used by the client, so is never sent to the server.

Now with web applications, thanks to javascript, you can retrieve and use it. So now instead of using it as a locator inside of a page filled with content, you can use it as a string that you know isn't shared with the server: it's perfect for a secret key. You can send the receiver a link with that key, they will put it in their browser, receive the javascript from the server and use that javascript to decode content thanks to the key.




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

Search: