chrome cookie size limit

前端 未结 3 1752
名媛妹妹
名媛妹妹 2020-12-05 07:00

I\'m writing into a session cookie from my plugin in chrome. The browser seems to have a strict limit of 4kb for cookie size. It doesnt seem the case in firefox. Is there an

3条回答
  •  天涯浪人
    2020-12-05 07:36

    You can't change the cookie size but you can use several cookies and span your data across them, keeping one cookie as a pointer to other cookies so you know what they're called, how many there are, etc (like a partition table on a harddisk).

    But perhaps you're approaching this the wrong way. If you need to do something like this, you're probably better off storing the data online as it has a better chance of survival and if you tie it in with some user registration, it's portable too.

    There are other options like Mozilla Weave and Google Gears, but Gears was recently announced to be discontinued.

提交回复
热议问题