$.REMOVECOOKIE CAN NOT REMOVE COOKIE?

Ankita Pandey

Total Post:183

Points:1285
Posted by  Ankita Pandey
 924  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. Kamlakar Singh

    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>

Answer

NEWSLETTER

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