Article

How to delete cookies

https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js
Copy to clipboard

The code for deleting a cookie is: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/cookies/ex15.js?actionable=true The remove function expects a cookie name, so that cookies can be deleted individually. Likewise to delete the user cookie we do: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/cookies/ex16.js?actionable=true For the shopping_cart cookie we do: https://raw.githubusercontent.com/finsweet/jqueryCourse/main/cookies/ex17.js?actionable=true

<script>
$(document).ready(function(){
  XT1
});
</script>
Copy to clipboard
Send to Live Demo

Live demo

<script>    
$(document).ready(function() {
  XT1
});
</script>
<script>
  
</script>
Copy to clipboard
Press the Run Demo button to execute the scripts above.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Your browser is too small

Resize your browser to be at least 769px wide.