Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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: #Clear #All #Cookies
ADD COMMENT
Topic
Name
1+5 =