Right now, when paging through the images on a page via prev/next, every step creates a new history entry. When the user tries to navigate back to the previous page, they have to step through all the images in reverse before being able to leave the page. This is very annoying behavior when someone is browsing between articles.
HTML5 provides a limited ability to manipulate the history (specifically one cannot delete history entries, only replace them), and fallbacks for old browsers provide even less, so it is not clear what would be a good alternative that is possible to implement.
T64167: Browsing through previous/next images should not change the back button function
T64274: Exiting Media Viewer with the back button can't escape past the last loaded page
T68217: MultimediaViewer should not update the browser's URL