Search code examples
sessionbrowserback-button

Browser back button - does it delete session data?


Does hitting the back button in a web browser cause the session data set in the preceding call to be deleted?


Solution

  • No, it does not.

    Well, if the user arrived to the previous page by POST (as opposed to GET) and reposts the page, the server is going to process the request again. It won't delete the data in the session though. It is possible to achieve this behaviour with some code, but that's not how it works by default.