0

I am creating cookies in JavaScript, I have followed w3schools.com link, when I run the example on w3school its making cookie,but when I copy the code and save it on an HTML file, its not making cookie on my local HTML file I also tried thisLink

this is what I am doing from w3schools Example

I have tried in Chrome and Firefox as well, its not making cookie when I open local HTML file

Community
  • 1
  • 1
Syed Salman Raza Zaidi
  • 2,172
  • 9
  • 42
  • 87

1 Answers1

1

If you want to use cookies, then use HTTP. Local files don't have cookie storage in most browsers.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335