One-click cookie deleter

DEV.to link: https://dev.to/carlyraejepsenstan/a-one-click-cookie-deleter-3mfa

Are you sick of clearing your cookies and getting logged out of literally everything? Use this code snippet instead!

javascript:(()=>{let a=document.cookie.split(";");let b=a.map(x=>x.split("="));let c=b.map(x=>x[0]);for(let i=0;i<c.length;i++){document.cookie=c[i]+"=; max-age=-100"}})();

How to use:

  1. Visit a random site and add it as a bookmark.
  2. Control-click, right-click, tap with two fingers, whatever… click “edit” and paste the above code into the “Address” box.
    2a. NOTE! Some browsers automatically strip the javascript: part from the beginning. Check to make sure that the bookmarklet address starts with javascript:. If it doesn’t, this won’t work.
  3. Visit some site (like Glitch) and click on the bookmarklet. Poof! No more cookies.
    (You might get logged out).

A screenshot for evidence:

5 Likes

Cool!

1 Like

now I don’t have to go and delete one specific cookie

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.