Search code examples
jquerycookiesjquery-cookie

I can't know if a cookie exists


Here are my cookies in my browser history :

enter image description here

Here is my code :

alert($.cookie('mailID1'));

And i get 'Undefined'.

Could please explain why?


Solution

  • Cookies are only sent to the domain they were created from, so unless that code is running on www.elevage-de-la-roche.fr your code will never see the cookie.