$.removeCookie can not remove cookie?

Total Post:183

Points:1285
 1092  View(s)
Ratings:
Rate this:
i'm using https://github.com/carhartl/jquery-cookie for manage my cookie
when i call $.removeCookie("Kamlakar"); it returns true but when i do $.removeCookie("Kamlakar"); Value is still there

  1. Post:194

    Points:1396
    Re: $.removeCookie can not remove cookie?

    basically the link gives a way to delete the cookie by setting its time to a negative time, so when it expires the cookie is gone. ( in Javascript ) and here is a way to do it in Jquery style.


    <script>
        //setting the cookie
        $.cookie({ 'myCookie': 'myValue' });
     
        // Get a cookie
        $.cookie('myCookie');
     
        // Delete a cookie
        $.cookie('myCookie', null);
    </script>

      Modified On Apr-05-2018 11:08:45 PM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!