Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 884
rjnpnigrhi Avatar asked Feb 25 '14 08:02

rjnpnigrhi


1 Answers

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.

like image 65
Fedor Skrynnikov Avatar answered Oct 07 '22 03:10

Fedor Skrynnikov