Wandering Thoughts archives

2023-05-12

The modern browser experience has some impressive subtle tricks

My current mouse has additional 'rocker' buttons, which Firefox (and probably other web browsers) map to forward and back one page, just like the keyboard shortcuts of Alt + Right Arrow and Alt + Left Arrow. Over the time I've become completely acclimatized to using them and having them just work, so it took a while for me to consciously notice a surprising situation where the 'back' rocker button worked.

A common UI for certain sorts of websites today is one where images are embedded as thumbnails and pop out to more or less full size in your browser when you click on them. This is the typical experience on Mastodon, for example. Once you've finished viewing the image, you can dismiss it back in a variety of ways; hitting Escape is one de facto standard way. Another way that works on many websites is my 'back' rocker button, which is an action that feels so natural to do and to work that it took me until recently to realize how odd it was that it works.

It would be natural for all forms of 'back one page' to work if popping out images this way took you to a different page, with a change of the URL in the URL bar and so on. But typically it doesn't, with the URL remaining unchanged, yet 'back' works anyway (and usually 'forward' won't work after you go back). So these websites are arranging to intercept the 'back' action or things that invoke it and do special handling, and the special handling comes across as so naturally the right thing to happen that I didn't even think about it until recently.

Of course, since this is the website doing it, different websites can have slightly different behavior (including a few websites who actually do change the visible URL). When there are multiple thumbnail images in a single post, it seems to be common to have the arrow keys cycle through them and for the 'back' action to exit this image mode entirely, instead of going to the previous image. On some websites, Alt + Left Arrow doesn't work although the 'back' browser button does.

But despite differences in specific behavior, the whole experience is natural enough that it feels irritating when a website with such pop-out images doesn't support 'back' to go back to what I was doing, and instead forces me to hit Escape or click their little 'close' button on the image. It may be magic but it's good magic.

(I assume that there are reasons this is only rarely implemented with an actual change to the visible URL.)

web/BrowsersBackImpressiveTricks written at 22:01:02; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.