function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ken KoellnerKen Koellner 

Browser History and Null PageReferences returning to same back re back button

Can anyone explain definitively what goes on with Browser history when a page button calls an action method that returns a Null page reference, such that the user stays on the same page and with the same controller?

I've noticed three different behaviors--
  1. The browser Back button is enabled and if the user hits it, they goes to the page in the prior View State.
  2. The Back button is not enabled.
  3. The Back is enabled but if I hit it I get the error "Document Expired  This document is no longer available."
I'd like to get behavior 1 all the time for a certain application but I can't figure out why on some buttons on some pages I get that behavior and on other pages or buttons I get 2 or 3.