I guess the title says it all. I made a very short and very simple game using Twine2/Sugarcube2. It would make more sense to me if users could just return to previous pages using the browser's back button. (There aren't any variables that I'm worried about getting messed up.)
Is this feasible? Maybe I'm crazy, but I think I had to alter the code to disable the back button in earlier versions prior to the current Sugarcube?
Thanks.
Comments
@Gridelin I'm afraid not. The ability to use the browser's backward and forward navigation buttons comes from the HTML5 history API. The API is not used at all within SugarCube v2 because the Chromium developers decided to completely break the HTML5 history API for locally opened files—see below for details.
SugarCube v1 attempts to, poorly, work around the issue—"poorly" because there's no better way to do it.
SugarCube v2 drops the HTML5 history API entirely to avoid the issue. Helpfully, as a side effect, this made the internal history API much simpler and easier to reason about—v1's history API is a labyrinthine mess—and enabled many new features, like the Jumpto dialog.
The HTML5 history API breakage went live around September 2015 and generated quite a bit of buzz in many Twine circles at the time. A quote of mine from elsewhere about the issue:
It shouldn't impact me too much, but just thought I'd ask if enabling the browser back buttons was possible. Interesting about the HTML5 history API too... Thnx again.
The way to add your own buttons for the history controls: