Skip to content Skip to sidebar Skip to footer

What Mean .length In Document.cookie

Can I ask what mean document.cookie.length in javascript? the number of cookies in document.cookie object Thanks! This is the code: function getCookie(c_name) { if (document.cookie

Solution 1:

document.cookie is simply a string, so .length is the length of that string. JavaScript doesn't provide any built-in functions to parse the individual cookies, you have to do that yourself.


Post a Comment for "What Mean .length In Document.cookie"