Clear all cookies

PHOTO EMBED

Wed Jan 05 2022 11:24:50 GMT+0000 (Coordinated Universal Time)

Saved by @desiboli ##javascript ##js

const clearCookies = document.cookie.split(';').forEach(cookie => document.cookie = cookie.replace(/^ +/, '').replace(/=.*/, `=;expires=${new Date(0).toUTCString()};path=/`));
content_copyCOPY

You can easily clear all cookies stored on a web page by accessing the cookie using document.cookie and clearing it. GDPR ?

https://blog.devgenius.io/15-javascript-codes-you-will-always-need-e8569903dd1