0

I'm working on a web app with that includes a "Search" button. We've included some code that says "when the user clicks submit, add a class to the submit button that animates it, and disable that button."

I observe that if I click "Back" from the search results page, the search page appears in its initial state: the button is not disabled, and it doesn't have the "submitting" class. This is good.

But can I rely on it? When the user clicks the "back" button in a browser, is it expected to restore the DOM as it first saw it, or as it last saw it?

What is the expected behavior of the back button, and how well do browsers conform?

Nathan Long
  • 122,748
  • 97
  • 336
  • 451

0 Answers0