Using IE<11 null is returned when reading a cookie which has an empty string as value. The expected result would be "".
The bug is caused by assuming an = sign is always present for each cookie in document.cookie. However, IE<11 emits the = sign for cookies with an empty string value:
Using IE<11
null
is returned when reading a cookie which has an empty string as value. The expected result would be""
.The bug is caused by assuming an
=
sign is always present for each cookie indocument.cookie
. However, IE<11 emits the=
sign for cookies with an empty string value:Note that other browsers and IE>=11 do include the
=
sign: