title: asp.net server side viewstate without sessions
body: <p>So I've done my best to minimize my viewstate on my ASP.net ajax application, http compression, disabling viewstate in hidden fields, but would like to go further. So after researching it seems that there are two approaches </p>
  
  <p>a) use the ASP.net 1.x way which uses LoadPageStateFromPersistenceMedium</p>
  
  <p>b) or use the ASP.net 2.x way SessionPageStatePersister </p>
  
  <p>So B doesn't look good because if I understand it correctly the viewstate would be linked to the session id, and since my session can expire for any number of reasons I want don't want this.</p>
  
  <p>So what's the best approach to saving viewstate on the server that does depend on sessions?</p>
  
  <p>If it's LoadPageStateFromPersistenceMedium and uses hidden fields, then how do I inject a hidden field with a random id into a page?</p>
  
  <p>How do I determine when it's time to clear viewstate files on the server?</p>