Issues in SPA when user uses browser's back or refresh function
<p>I am almost finished with a SPA application using AngularJS and Bootstrap. So far, I got everything working as desired, except for one thing: Proper handling with the users acts on the Browser's back or refresh buttons.</p>

<p>All the sub-pages within the application have buttons/links to the pages the user may switch to. Still, the application should handle properly <strong>back</strong> and <strong>refresh</strong> browser buttons. I should add that there is a login process to enter the application.</p>

<p>Also, all the critical information is stored under <code>$rootScope</code>, so everything is lost when the user refreshes and, in some cases, when he acts on the back button the results are not as desirable.</p>

<p>I actually have two questions: </p>

<ol>
<li><p>What is the widely accepted standard behavior of applications like mine when browser buttons are acted on? (remember, there is a login process to begin with).</p></li>
<li><p>How should I start tackling the implementation of this approach?</p></li>
</ol>

<p>One option I was thinking, is to intercept the request, warn the user that the action will log him off, and if the user cancels, force the browser to ignore the request (not sure this is possible).</p>