I am working on an MVC3 application that has book and chapter objects. I use Session to remember settings chosen by each user. An example of a setting is last chapter viewed. It works great when users only have one browser open at a time.
Here is my challenge: Some users open up multiple browser instances at the same time. They use the same credentials to login to each instance. In one browser the last chapter viewed should be different than it is in the other browsers. Currently the session settings for a user overwrite the session settings in the other browser instances. What alternative approach can I use that will allow users to open multiple browsers and still remember the appropriate settings for each?
Store them in a hidden field on the page. Check out MVCContrib Html.Serialize to write a settings object to the page and rehydrate it on post. You can then just reference each pages object. A cookie doesn't always guarantee a unique instance especially if your browser is sharing sessions.