5 ms·
Usability improvement request for this article: don't hijack the browser back button :P
by mwkaufma 2y ago
Usability improvement request for this article: don't hijack the browser back button :P
- llm_nerd 2y agoIt's already egregious when a site adds history pushState entries for just clicking through a gallery or something, but wow adding them just for scrolling down on a page is simply bizarre, especially on a page about usability.
- nottorp 2y agoIt's in the spirit of adding emojis to compiler output...
- ender341341 2y agoI actually quite like the emojis they put in the output, it helps alleviate the balance of providing enough context while also giving a clear visual indicator for the actual error message. They aren't going overboard on it, they just put a warning emoji in front of the error message.
- nottorp 2y agoHow do you grep for it without taking your hands off the keyboard?
- perching_aix 2y agoWindows key + dot, then type in warning / if it was among the last ones you used, use the arrow keys, and hit Enter to insert it. If you use whatever OS other than Windows, I'm sure there are similar flows available if you search for it. And since it's just Unicode, I'm sure there are numpad based keybinds available too.
- nottorp 2y agowhy shouldn't i just type grep warning instead of bringing up some GUI that possibly takes forever to initialize? how does it work over ssh? :)
- johnisgood 2y agoIt makes too much sense.
- alisonatwork 2y agoEmoji selector is fast and works perfectly fine over SSH, it's no different to any other input method that needs to use characters beyond 7-bit ASCII. grep is a bit more iffy. UNIX command line tools seem to be a bit of a crapshoot in how or if they support Unicode, especially if you switch between different systems like Linux, BSD, Cygwin etc. You might need a bit of experimenting with the LANG variable to get it work (e.g. Git Bash on Windows needs LANG=C.UTF16 to match an emoji). I've also had cases where grep or sed works, but awk doesn't, or vice versa. On the whole it works a lot better nowadays than it used to, though, and that's a win for non-English users of the command line as well as emoji fans.
- nottorp 2y ago> that's a win for non-English users of the command line I am non english. I use ăâîșț. When writing a text document for humans. I also use :) but not . I'm still of the opinion that anything not 7-bit ascii doesn't belong in something that may be machine processed. Which includes compiler output. Edit: hey, HN erased my emoji. The dot was supposed to be the :) emoji style.
- alisonatwork 2y agoDidn't you ever grep a text document written in a language other than English? No processing of CSV files in different charsets? Not even encountered a file with a non-English character in the name? Not to mention the folks who deliberately set LANG so that their compiler and everything else will give them localized error messages. This stuff was all much worse 25 years ago, even 15 years ago. Like them or not, I do think emojis have helped drive forward much better Unicode handling across the whole stack, including the command line.
- optionalsquid 2y agoIn Firefox, you can prevent this by setting `browser.navigation.requireUserInteraction` via about:config. I've been told that it breaks some stuff, but to date I haven't noticed any downsides
- teddyh 2y ago> you can prevent this by setting `browser.navigation.requireUserInteraction` Setting it to what?
- optionalsquid 2y agotrue
- budmichstelk 2y agoDoesn't answer your question, but in Tor Browser it would decrease your anonymity set.
- DyslexicAtheist 2y agoUsability improvement request for this site: don't promote a comment that isn't related to the content to the top :P
- perching_aix 2y agoNot an issue with JS disabled ;)
- bigstrat2003 2y agoBrowser makers should straight up remove the JS API for interacting with history. There are legitimate uses for it, but the malicious actors far outweigh the good ones at this point. Just remove it.
- Dracophoenix 2y agoDitto for unprompted redirects.
- bonzini 2y agoRedirects are used for stuff like POST->GET or canonicalizing URLs (adding slashes on directories), would you get rid of that too?
- spookie 2y agosame for clipboard events.
- panzi 2y agoI mean, without `history.pushState()` and `window.onpopstate` things wouldn't be as nice. Ok, I guess one could do about everything with `location.hash = ...` and `window.onhashchange`, like in the before times. But the server will not get the hash part of the URL so a link to such an page can't be server side rendered and has to fetch the actual page content in JavaScript, evaluating the hash. When I browse things like image search it is really handy that you can use the browsers back button to close an opened image without loosing any dynamic state of the page and that the x button on the page will close the image and remove the history entry just the same way, so a later back won't re-open that image. For me the back button wasn't hijacked. But I am for disallowing the use of `history.go()` or any kind of navigation inside of `onpopstate`, `onhashchange`, `onbeforeunload` or similar or from a timer started from one of those.
- deleted 2y ago[deleted]
- TZubiri 2y agoworks fine for me (MS Edge)