Chromium67 Cookies数量限制

博客主要介绍了Chromium67对Cookies数量的限制情况,给出了相关源码(chromium),还提供了用于网页测试的网址http://browsercookielimits.squawky.net/ 。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Chromium67 Cookies数量限制

  • Chromium67对Cookies数量限制如下
Max Cookies Per DomainMax Cookie Size Per Cookie(byte)Max Cookies
18040963300
  • 源码(chromium)
	// chromium/src/net/cookies/cookie_monster.h

 	// Cookie garbage collection thresholds.  Based off of the Mozilla defaults.
  	// When the number of cookies gets to k{Domain,}MaxCookies
  	// purge down to k{Domain,}MaxCookies - k{Domain,}PurgeCookies.
  	// It might seem scary to have a high purge value, but really it's not.
  	// You just make sure that you increase the max to cover the increase
  	// in purge, and we would have been purging the same number of cookies.
  	// We're just going through the garbage collection process less often.
  	// Note that the DOMAIN values are per eTLD+1; see comment for the
  	// CookieMap typedef.  So, e.g., the maximum number of cookies allowed for
  	// google.com and all of its subdomains will be 150-180.
  	//
  	// Any cookies accessed more recently than kSafeFromGlobalPurgeDays will not
  	// be evicted by global garbage collection, even if we have more than
  	// kMaxCookies.  This does not affect domain garbage collection.
	static const size_t kDomainMaxCookies;
 	static const size_t kDomainPurgeCookies;
	static const size_t kMaxCookies;
	static const size_t kPurgeCookies;


	// chromium/src/net/cookies/cookie_monster.cc
	// 如果自定义Cookie限制的话,修改这里就好了。
	const size_t CookieMonster::kDomainMaxCookies = 180;
	const size_t CookieMonster::kDomainPurgeCookies = 30;
	const size_t CookieMonster::kMaxCookies = 3300;
	const size_t CookieMonster::kPurgeCookies = 300;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

林多

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值