title: How to persist jQuery UI dialog state between requests?
body: <p>I have an ASP.NET MVC web application. The application can be managed with a "remote control", which is a <a href="http://jqueryui.com/demos/dialog/" rel="nofollow">jQuery UI dialog</a> and appears only when a user with sufficent permissions logs in and clicks on the "show remote control" button. (Obviously, the HTML code of the dialog is not there otherwise.)</p>
  
  <p>When the user clicks on a link on the site, this dialog closes itself.<br>
  I want the dialog to "remember" that it was open and open itself automatically in such cases.</p>
  
  <p>What is the simplest and most cross-browser-compatible way of doing this?<br>
  <em>(Let's assume for now that I don't want to care about archaic browsers, the people who will use this will use new browsers.)</em></p>
  
  <p>Here is the code that initializes the dialog.</p>
  
  <pre><code>$(document).ready(function () {
      $("#remote-control").dialog({
          autoOpen: false,
          show: "explode",
          hide: "explode",
          title: "Távirányító",
          minWidth: 220,
          maxWidth: 260,
          width: 190,
          height: 300,
          maxHeight: 500,
          position: [50, 100]
      });
  
      $("#remote-control-opener").click(function () {
          $("#remote-control").dialog("open");
          return false;
      });
  });
  </code></pre>
  
  <p>Thanks in advance for your answers!</p>