ASP.NET User Profile Against Using Cookies

I think that in almost all cases, user preference data can be stored in a cookie with (almost) equally good results, as when using the user profile API. The disadvantage of using cookies (for authenticated users) is that the cookie can be deleted or timeout, in which case user preferences will be lost. For anonymous users, if preference data should be stored in sessions, then a cookie should be used, even if user profiles are used.

So, what are some of the biggest advantages / disadvantages of using user profiles or cookies to save user preferences?

+3
source share
6 answers

Another disadvantage of storing all preference data in cookies is that all this data must be sent in every request from the client and in any response from the server whenever a data change occurs. Although this may seem minor in the era of broadband access, it is still an additional overhead. Using the API profiles allows you to retrieve data stored on the server, and the browser should only send session identification cookies.

, , , cookie , , Profiles, . . cookie, - .

+2

, - , , , , - , .

cookie - , , , , , , , , , - cookie .

, , cookie - , IE 50 cookie ( 20), - 4096 cookie ( ) - 4 , .

+3

cookie , ( , ). . , , .

, , cookie, .

, ( , , , , - ), :

  • : cookie, . , cookie, , , , , , .
  • cookie , , , , .

( - , )

+2

, cookie , , .

API , , (?). , , .

, , , .

+1

, ProfileProvider, cookie, , , , cookie (, ..),.

+1
source

In fact, you do not need to store preference data in cookies for anonymous users when using the ASP.NET profile provider. Just save the current UserID (which is some awful-looking string associated with the session) in a cookie. This becomes the previous UserID on subsequent visits, and then you can simply grab the old profile information and transfer it to the current profile or even authenticate them as the old anonymous profile.

+1
source

All Articles