1

I am looking for a way to delete the cookies through JavaScript that one can input into the console in chrome dev tools.

I have also tried to delete the rows from chromes SQLite cookies database but this doesn't work as they're already loaded into the browser.

Extensions aren't a solution unless they can be called programmatically through JavaScript.

Thanks!

*All current solutions I've found on the first 200 pages of google don't work. They tend to involve setting the expiration date. Chrome itself and some extensions are able to clear the cookies instantly so they are not visible in application>cookies in chrome dev tools.

  • they do the same, there's no function to clear cookies, you need to set expiration to a date before "now" and they will be removed - that's [how cookies work](https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie) – balexandre Mar 10 '22 at 22:29
  • Just paste the function and run it inside devtools from this post: https://stackoverflow.com/questions/179355/clearing-all-cookies-with-javascript – code Mar 10 '22 at 22:38
  • @balexandre They work in a different way. Watch the the dev tools readout. You can remove them all instantly by clicking without having to change any expiration date. Changing the expiration date also just doesn't work, pasting those commands/functions into the console does nothing. – Sarah Peterson Mar 11 '22 at 00:37
  • @code none of those functions do anything when pasted or called in chrome dev tools or a js injector. – Sarah Peterson Mar 11 '22 at 00:42

0 Answers0