title: MVC4 Ajax request and loss of browser state
body: <p>I have a MVC4 application. A served page have multiple items with typical "Add to favorites" link to it. Something like -></p>
  
  <p><code>[page 1]
  ...[item1][Add to favorites]
  ...[item2][Add to favorites]</code> </p>
  
  <p>"Add to favorites" is a Ajax actionlink which connects to the backend. The backend basically maintains a list of favorited items in Httpcontext.Session. A JSON response "true/false" is sent back to client. If 'true' the client code changes "Add to favorites" link to "Favorited". Something like:</p>
  
  <p><code>[page 1]
  ...[item1][Favorited]
  ...[item2][Add to favorites]</code></p>
  
  <p>Now if I visit another page, say Page x, and come back to [page 1] after that, I see </p>
  
  <p><code>[page 1]
  ...[item1][Add to favorites]
  ...[item2][Add to favorites]</code></p>
  
  <p>instead of </p>
  
  <p><code>[page 1]
  ...[item1][Favorited]
  ...[item2][Add to favorites]</code></p>
  
  <p>I'm wondering if there's a way to display the true state. Thanks.</p>