Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Clear All Cookies

const clearCookies = document.cookie.split(';').forEach(cookie => document.cookie = cookie.replace(/^ +/, '').replace(/=.*/, `=;expires=${new Date(0).toUTCString()};path=/`));
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #javascript #Clear #All #Cookies
ADD COMMENT
Topic
Name
3+6 =