Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

What really happens when cookies file exceeds maximum size?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
356 views
Welcome To Ask or Share your Answers For Others

1 Answer

The typical behavior of most browsers, to my knowledge, is to simply truncate the oldest data that does not fit.

For example, create cookies 1 through 9. When creating cookie 10 and the data size is going to overflow, cookie 1 is simply discarded.

In general practice, if you are worried about bumping into the limit and loosing cookies to overflow, it is probably time to rethink your strategy of what you are storing and start caching the data server-side and limiting the cookie to a value to access the cached data.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...