Store the current view on the page. For instance, your page has two tabs, 'view' and 'edit', and users can switch between both modes. Storing in the page the current mode will be very handy to control which element to show and hide using conditions. When the user refreshes the page, the last mode will be lost.