Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have quite a similar situation myself in wanting to prevent a browser back situation and have researched a few different solutions. The first and worst being a Java script function which takes the user back to the page they were on if they click the back button in the browser. It hides the problem rather than solving it but thought id mention it. The code as follows:</p> <pre><code>&lt;script type="text/javascript" language="javascript"&gt; function disableBackButton() { window.history.forward() } disableBackButton(); window.onload = disableBackButton(); window.onpageshow = function (evt) { if (evt.persisted) disableBackButton() } window.onunload = function () { void (0) }; &lt;/script&gt; </code></pre> <p>This works for Firefox, Chrome and IE ok. You can just put this in your master page. Many people will tell you this is not the way to do things however as it intrudes on the well known browser behaviour etc etc</p> <p>So my second suggestion is something I have seen here: <a href="https://stackoverflow.com/questions/1160105/asp-net-mvc-disable-browser-cache/1705113#1705113">Disable browser cache for entire ASP.NET website</a> Which will not cache anything which is more inline with what you are wanting I think.</p> <p>Another idea would be to pass a page or session token around and on actions check the token - if its invalid reroute to an error page. That would at least prevent a new user doing anything with the previous page.</p> <p>Id be interested to know how you solved this, if you have solved it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload