Home > Blockchain >  Delete cookies in site information
Delete cookies in site information

Time:06-19

I'm building a web app using Angular. I want to delete cookies, which is shown in site information

enter image description here

enter image description here

But these cookies are not showing in the developer console

enter image description here

I want to delete these cookies using JavaScript. But I can't even access these cookies using document.cookie. How do I delete these cookies using JavaScript? Any solutions? Feel free to use Jquery or npm package.

CodePudding user response:

What you are trying, removing cookies, might not be possible to do directly from the browser via JavaScript.

I cannot confirm from your pictures, but from your problem I deduce that the cookies that are not showing on the developer console or on document.cookie have the flag HttpOnly this attribute prevents the access to this cookies via JS, from MDN:

Use the HttpOnly attribute to prevent access to cookie values via JavaScript.

You can find more information about the topic and cookies in general in the MDN documentation.

  • Related