Live data from Hacker News

Animating URLs with JavaScript and Emojis

matthewrayfield.com

21–30 of 173 posts

Re: Animating URLs with JavaScript and Emojis

#25

> ou can use emoji (and other graphical unicode characters) in URLs. And wow is it great. But no one seems to do it. Why? Perhaps emoji are too exotic for normie web platforms to handle? Or maybe they are avoided for fear of angering the SEO gods? No, we don't because it's stupid. Thank god e-mail spam doesn't seem to do this very much with subject lines, what is so wrong with putting TEXT where text belongs? Welcome…

its a joke.

Re: Animating URLs with JavaScript and Emojis

#26
post #17

This is very cute and all but... you know... don't actually do this! Please. Even if you make it so that it doesn't break the back button or history, URLs are things that people copy and paste and send to people. They are put into Word-documents, bookmarks and archive.org. It's not a place for dynamic animations. URLs should be static, simple, and as short as is reasonable.

While in the video he's updating the location hash (which breaks the backbutton), one can implement this using history.replaceState[1] to keep the back button working normally. He also mentions parsing the animated URL the figure out how far the video was loaded. So if you want you can use the animation in terms of navigation. Or alternatively just put the animation behind a separator and have your router ignore the animation part.

This would preserve both the back button as well as bookmarking! Note that this video is more of the hacking nature what fun things can we do with the URL bar, he stated a number of times that it's more cool than actually useful.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/History_API...

Post reply on HN