rjnpnigrhi
rjnpnigrhi

Reputation: 79

angularjs $cookieStore size limit

I found that angularjs serializes and deserializes when using $cookieStore.put/get and I'm able to put a whole object into it. So what is the size limit? 4kb?

Upvotes: 7

Views: 2662

Answers (1)

Fedor Skrynnikov
Fedor Skrynnikov

Reputation: 5609

cookie size is 4kb. if your object less than that you will be capable to add the whole object. Just keep in mind that 4kb is for whole cookie including name, expiration and value. But cookie may not be appropriate place to store objects. Please consider to use html5 localStorage except cases when you 100% sure you want it to be in cookies.

Upvotes: 6

Related Questions