Angularjs $ cookie Store Size Function

I found that angularjs is serialized and deserialized using $ cookieStore.put / get, and I can put the whole object in it. So what is the size of the limit? 4kb?

+6
source share
1 answer

Cookie size is 4 KB. if your object is smaller than you can add the whole object. Just keep in mind that 4kb is for all cookies, including name, expiration date and value. But a cookie might not be the right place to store objects. Please consider using html5 localStorage unless you are 100% sure you want this to be in cookies.

+5
source

All Articles