How can I delete a cookie using jquery?

0

I am working on a login using cookies to save the user, but at the time of logout using jquery I want you to delete the cookie so that I have to authenticate again, how can I do that?

try this line that I found on the internet:

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

The cookie is called a user but in the browser I get an error when wanting to use that method, it tells me that .removeCookie is not a function. I have added these two libraries:

<script src="../jquery-3.1.1.js"></script>
<script src="carhartl-jquery-cookie-92b7715/jquery.cookie.js"></script>
    
asked by DavidRivera 14.07.2017 в 18:16
source

1 answer

0

Here is the library that you need

GitHub

The latest version GitHub

    
answered by 14.07.2017 в 18:59