简体   繁体   中英

what happens when cookies file exceeds maximum size?

当Cookie文件超过最大大小时会发生什么?

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.

该文件被截断为最大长度。

我认为这将取决于浏览器,因为RFC2965没有定义cookie的最大大小或超过最大值时的任何标准行为。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM