title: ASP.Net Razor not generating Scripts section on timeout redirect
body: <p>I can't figure out why this is happening.  Can anyone shed some light on it?</p>
  
  <ol>
  <li>User navigates to my application.  (e.g. <a href="http://foo.com/bar" rel="nofollow">http://foo.com/bar</a>)</li>
  <li>I have the <code>[Authorize]</code> attribute in my "home" controller for my "index" <code>ActionResult</code> method.</li>
  <li>The user is automatically redirected to "<a href="http://foo.com/bar/account/login" rel="nofollow">http://foo.com/bar/account/login</a>".</li>
  <li>The <code>Razor</code> section <code>@section Scripts { }</code> renders.</li>
  <li>The user logs in, and upon form submit they are redirected back to the index.</li>
  <li>User clicks around on various links, all of which have <code>[Authorize]</code> in the controller. All works.</li>
  <li>User waits 20+ minutes.</li>
  <li>User clicks any link.</li>
  <li>The <code>[Authorize]</code> attribute kicks them back to the Account/Login page, but THIS time the <code>@section Scripts</code> never renders.</li>
  </ol>
  
  <p>UPDATE: I solved this work a work around.  I'd like to know the correct way to have done this as what I have done I consider more of a hack than a real fix.  So I'll leave this question open for a few days and see if anyone can explain.  After that I'll close it.</p>
  
  <p>I did not realize this or I would have mentioned I was using it - my problem was coming from jQuery mobile.  When you click a link, the URL in the toolbar shows that address, however the content in the window shows the login page.  jQuery mobile has pulled the page in while hidden, and then done it's animations to scroll it into view.  This seems to be the cause.</p>
  
  <p>I added an event for <code>$(document).bind("pageinit", function () {});</code> and inside that, I check for a specific element to be on the screen.  If I find it, I assume I'm showing the login page, and I call the same script code that was supposed to have been called when the page loaded.</p>