Cookies vs. isolated Storage
-
Does anyone here have any thoughts or comments on this? Because of the way that Silverlight apps run it seems to me that it would be simpler to store stuff that would typically go into a cookie in isolated storage. However, the users expectation to be able to clear data by using the Internet properties window would not (I think) have an impact any any of these stored settings so... Thoughts?
-
Does anyone here have any thoughts or comments on this? Because of the way that Silverlight apps run it seems to me that it would be simpler to store stuff that would typically go into a cookie in isolated storage. However, the users expectation to be able to clear data by using the Internet properties window would not (I think) have an impact any any of these stored settings so... Thoughts?
Even though they can be used the same way, they are different. Isolated storage provides a complete virtual file system to a restricted application, which is much more robust than cookies. I don't have good "answer" for this, but I would say - examine the pros and cons of both and use what's appropriate. :)
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Does anyone here have any thoughts or comments on this? Because of the way that Silverlight apps run it seems to me that it would be simpler to store stuff that would typically go into a cookie in isolated storage. However, the users expectation to be able to clear data by using the Internet properties window would not (I think) have an impact any any of these stored settings so... Thoughts?
Put a GUID in the cookie, store that GUID in your isolated storage, if they go to the page and the GUID is missing then wipe the part of the isolated storage you would have expected the user to "clear" by manually clearing it. This way you can properly clear user data, but get the benefits of using local storage instead of a cookie. (If it's a security issue, put a key in the cookie instead of a GUID).