Something I have had trouble understanding the technical/implementation requirements is what should happen to a user's logged in state when they press the back button immediately after logging in (or actions that put them in a logged in state).

To align with user expectations, there should be a clear call-to-action followed by some status indicator that they are logged in. Hence one might also expect there to be a clearly defined interaction if the user ends up being in a logged out state.

However, the back button behaviour on a browser for a web application doesn't always seem to obey this rule, and I am looking for some good examples of how this is best managed from a consistent and fluent user experience point of view.

It will be helpful if any technical limitations that result in a less than ideal user experience can be explained.

  • 1
    I think most of the time the user does not necessarily expect to be logged out when she clicks the back button, but rather to just view the last site she visited again (regardless of her logged in/out status). Logging her out again would not appear logical to me as clicking the back button does imply "take me one navigation-step back" rather than "undo what I have done".
    – kschiffer
    Nov 2, 2018 at 9:50
  • @kschiffer I am not suggesting that the default behaviour should be logging the user out or not when they press the back button, but there's definitely not clear indication most of the time what the expected outcome would be when they press the button. Hence I am looking for some examples of how this has been dealt with that has the optimal user experience in mind.
    – Michael Lai
    Nov 2, 2018 at 11:55

1 Answer 1


Both scenarios of loading the Log In page vs. Portal when pressing BACK are plausible. It's up to the programmer to tell the browser what to do.

Replicate this behavior in Facebook. When you click BACK after logging in, you'll see the browser tab label loads "Log In..." for a millisecond and then automatically snaps back to the News Feed. This means the login page was loading but the code header redirected the browser to the News Feed before loading the Log In page.

As for what the BACK button does in the browser, it can do any of these depending on how the website was programmed: Pressing the BACK button can do 3 things depending on how it is programmed:

  1. Load the cached page
  2. Load the non-cached page (browser re-requests the page from the server)
  3. If cached page expired, re-request the page from server

Your Answer

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

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