How To Delete Cookies With JavaScript

preview_player
Показать описание
In this tutorial, you'll learn how to delete cookies with JavaScript.

In a previous JavaScript Howtos episode we looked at getting the value of cookies stored in the browser. In this video, we'll look at how to remove a cookie from the browser with JavaScript.

Removing a cookie with JavaScript is just a matter of setting it's expiry to a date in the past, the browser will do the rest for us. To delete a cookie with JavaScript we therefore just set a new cookie value (or remove the value of the cookie as it's not needed anymore) and at the same time update the expiry date, setting the cookie to a date in the past.

#JavaScript #JavaScriptHowtos #Cookies Channel Handle @codebubb
Рекомендации по теме
Комментарии
Автор

Thanks so much. Dunno why it was so difficult to remove a damn cookie in react.

Unmighty
Автор

May 0.001% people who read this comment








I wish your dream come to be true . Have a nice day .

gmkhussain