Home > DeveloperSection > Forums > $.removeCookie can not remove cookie?
Ankita Pandey
Ankita Pandey

Total Post:183

Points:1285
Posted on    October-08-2014 6:54 AM

 JQuery JavaScript  JQuery 
Ratings:


 1 Reply(s)
 629  View(s)
Rate this:


Kamlakar Singh
Kamlakar Singh

Total Post:194

Points:1396
Posted on    October-08-2014 6:56 AM

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>


Don't want to miss updates? Please click the below button!

Follow MindStick