Live data from Hacker News

Animating URLs with JavaScript and Emojis

matthewrayfield.com

11–20 of 173 posts

Re: Animating URLs with JavaScript and Emojis

#13
This got me thinking about some standardized control elements websites could put in the address / menu bar.

Something like media controls, progress bars or even consent banners. This way they would have an unified appearance and could be user scriptable.

Re: Animating URLs with JavaScript and Emojis

#16
post #6
post #4

Earlier quoted context omitted.

Because it manipulated the hash component directly. By using the "replaceState" method of the history API [1] you could avoid polluting the browser's history. [1] https://developer.mozilla.org/en-US/docs/Web/API/History_API

Didn't the article say the history API was throttled on Chrome and Safari?

You're right, I missed that part.

For the Chrome part in any case it doesn't match my experience: under linux Chrome will happily update the url up to every 20ms (50Hz). At higher frequency it will throttle it saying that otherwise the UI would hang. The limit on Safari (which I cannot test) can be annoying in fact, but not as much as an URL updating 20 times per second :-)

By the way I also find the other reason for not using the History API to be a non-issue, since you can just use the location object to build the whole url from scratch, if you really want to

Re: Animating URLs with JavaScript and Emojis

#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.

Re: Animating URLs with JavaScript and Emojis

#18

"Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should."

That was literally the first thing they did! They stopped, thought about whether or not they should, and then did! And now we have animated url emojis and an island filled with dinosaurs and what could possibly go wro

Re: Animating URLs with JavaScript and Emojis

#19
post #6
post #4

Earlier quoted context omitted.

Because it manipulated the hash component directly. By using the "replaceState" method of the history API [1] you could avoid polluting the browser's history. [1] https://developer.mozilla.org/en-US/docs/Web/API/History_API

Didn't the article say the history API was throttled on Chrome and Safari?

literally hundreds of entries, I don't think that's very cool.

Re: Animating URLs with JavaScript and Emojis

#20
> 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 to Web 3.0, home of shitty memes and stupid emoji gimmicks

Post reply on HN