How to maintain Consistent Session State with Javascript Cookie Rectification
If a user utilizes the back button, the cookie value is not updated by the normal browser behavior. In order to do this, we need to store cookie values within the pages, and rectify the cookie to have the same values as when the page was originally viewed.