开发者

Cookies: More but smaller or less but bigger?

Regarding web optimization, load-time, speed performance and assuming data size to be equal:

Is it faster to have more cookies but smaller, or less cookies but bigger?

For the technically inclined: would it be more efficient to concat values separated by a known delimiter resulting in a larger cookie size, or to have smaller cookies containing single values?

And for the sake of argument, let's assume we're not in danger of exceeding the 4k/20 cookie limit =)

Thanks!


Edit: This thread didn't come up in my searches, but apparently it asks the same question so I apologize for the repost:

in a website, setting one cookie is better than setting many single cookies?

IMHO, the answers seem vague and even contradict, so maybe there is no clearcut answer here. It would be nice to have some empirical benchmark data or technical basis for an answer, bu开发者_如何学Pythont that might be too much to ask =)


Each cookie has additional attributes, like expiration date. If you don't have to change a cookie each time, I'ld go for one cookie containing all data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜