mercredi 27 février 2019

Remove cookie method doesn't work when I have a % symbol in cookie value

We have a cookie called gstid which holds a value "hh%d@gmail.com"

$.removeCookie('gstid', { path: '/' });

Interestingly remove cookie returns false when there a is % symbol in my cookie value. But for all other cookie values it returns a true. Any thoughts on why it goes wrong with a % ?. How do I handle this scenario for a %.

You could set a cookie using any plugin and place this snippet on a chrome console.

Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire