1

Imagine a web app page which shows all your recently submitted expenses (Page A). You then click the primary action button "Add a new expense" which takes you to a form to complete (Page B).

After completing the form you choose to "Save and view expense", in which case you go to a page showing all the details of the expense you just added (Page C).

In this situation, would clicking the browser back button usually take you to a blank "Add a new expense" form (page B), or take you back to the original screen showing all your expenses (Page A)?

2
  • All browsers have a Form Resubmission Alert for those cases
    – Danielillo
    May 4, 2022 at 16:34
  • 1
    @Danielillo, this all depends on whether a traditional POST was made, or whether something was sent asynchronously. Oct 12, 2022 at 8:57

2 Answers 2

0

In my opinion, you should not have a back button at all. Just show the results in a modal or hidden div loaded with AJAX and add a close button, otherwise you will face this kind of problems. This way you can also preview and save changes with context (e.g. showing the changes) that you lose when you go back.

Another problem (though it can be prevented as long as you actually DO NOT submit the form) is that most browsers reload the submitted form, so you may get multiple repeated submissions instead of one. Another problem is that the information in the form is deleted as soon as you go back. Or retained, which could also be a problem.

Aside from what I mention in the first paragraph, you could also have one button that saves and goes to page A ("Save and view issues") and another that saves and lets you add another issue (e.g. goes to page B) and is labeled something like "Save and add another". This is used in some forms, at the moment I only remember the Vesta Control Panel. In the Google API console there is something similar, but it is called "Save and keep on this page".

2
  • Thanks for your help! You said I should not have a back button at all but I am talking about the browser back button which is always available. Similar to the main question I asked, if I save and go back to Page A I have a similar issue, where would the browser back button take me?
    – Gueda
    May 4, 2022 at 15:55
  • Sorry I wasn't clear. What I meant is that by having a close button on a modal or div, users won't need to use the browser's back button.
    – Devin
    May 4, 2022 at 16:31
0

First, browser return is to return to the previous URL. So I think I should go back to page A and configure a separate URL. On page B of filling in the form, there is no need to configure a separate URL, similar to a pop-up window. And page C needs to configure a separate URL. Therefore, after returning from page C, it directly returns to page A Because there are many problems in returning to page B, such as whether the data is retained, whether it is repeatedly submitted, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.