Search code examples
c#cookies

How to check cookies in browser are set to httponly


I have set cookies to http only. But how can I verify it via browser?. Is there is any way that we can check whether the cookies only accept http?

HttpCookie HttpOnlyCookie = new HttpCookie("Code", Code);
HttpOnlyCookie.HttpOnly = true;
Response.Cookies.Add(HttpOnlyCookie);

Solution

  • Yes, use your browser dev tools. In Firebug there is a Cookies tab. In Chrome I use 'EditThisCookie' extension. Both of which show a 'HttpOnly' checkbox to verify the setting.

    enter image description here