2

On a web page, I need all the cookies' name and value. The problem is that, for example, on Google Chrome, I can see cookie information using Developers Tools > Resources > Cookies, but it returns an empty string when I type "document.cookie" on the console.

Is there a 'javascript way' to display the coookie information as it is seen in the Resources tab?

2

1 Answer 1

1

Those cookies are HTTP-only cookies and you cannot access them via Javascript. This would cause major security vulnerabilities.

For more clarification on security check OWASP documentation

https://www.owasp.org/index.php/HttpOnly

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.