An application I've been working on has a workflow something like this:
Page A show a list of items and links to page B
Page B lets you pick a type of item from a list, which brings you to page C
Page C is a form for adding the type of item you picked on page B, and submitting it brings you back to page A, which now shows your updated list of items.
So pages B and C should be transient in the sense that once the form is submitted, you should have no need to go back to either in the state that they were in before you submitted the form. If you click the back button from page C, it should bring you to page B so that you can choose a different item type, but once the form is submitted and you make it back to page A, clicking the back button should bring you to wherever you were before you got to page A, rather than taking you back to page C and the form that you just submitted.
In a way this mimics how most iOS applications work when adding new items, where you click a "+" button and a new form is overlaid on your current workspace, much like you are taking out a new sheet of paper. When you are done with the form, it is removed from the view, leaving you in the same place you started.
Inspired by
this post I chose to implement this by adding a "data-transient=1" attribute to the page div of pages B and C. In changePage() I added a flag to the urlHistory.stack indicating whether the page was transient, and then overrode window.history.back() to check if the current page was transient, and if not, look backwards through the history stack until it found another non-transient page to go back to.
I'm wondering what people's opinions are on taking this approach. Does it make sense? Is this a terrible idea? Would anyone like to see this kind of functionality in jQM? Is this kind of functionality already supported? Is there a better way to accomplish this?