How long can a document.cookie string be? In other words, how many cookies can I set?
300 cookies total
20 cookies per server (not per page or site)
4K of data per cookie (both the name and value of the cookie count towards this limit)
As a result, it is not a good idea to create separate cookies for each value you’d like to save. Instead, combine those values into a single cookie separated by a known delimiter.