user2669989
user2669989

Reputation: 270

how to know if website is using cookies or not?

I've a requirement to verify for the website that I need to test.

My question, How do I find out the Smartway if any whether the entire Website is really using the cookies or not?

I know a way by which I'll disable the cookies in the browser and then while accessing the website from that browser it should shout out that cookies are not enabled in the browser. But I believe for this I'll have to check each-and-every webpage to confirm whole website is not using cookies.

Upvotes: 1

Views: 2251

Answers (2)

Zeplin Reapers
Zeplin Reapers

Reputation: 11

if (document.cookie != null) {
  alert("Cookies!")
} else {
  alert("No cookies!")
}
<!-- YOUR CODE -->
<h1>Note: Stack Overflow dosent let me check document.cookie ):</h1>

I think this will work...

Upvotes: 1

Dan Kreiger
Dan Kreiger

Reputation: 5516

You can run document.cookie in your console to read all the cookies accessible from that location.

You could also open up your dev tools and view them there. In Chrome, the cookies can be found in the application tab of the dev tools.

More info

Upvotes: 1

Related Questions