Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

KS asked in Computers & InternetInternet · 2 decades ago

What is cookie name in JavaScript?

when I browse some different webpages (even of different websites and domains) cookies of one page show up in another webpage. Is it because of the names of the html controls are same or similar. if this is not reason, then how does it work?

What and how exactly the cookie name used in JavaScript.

1 Answer

Relevance
  • 2 decades ago
    Favorite Answer

    cookies are used to store information about a user on their computer. generally, it's used to track preferences, and allows customization of websites. it also gets used to keep track of shopping cart contents. cookies are used in combination with sessions to track this info.

    cookies can not travel between domains as this violates security. if you're seeing the same cookie name on multiple websites, it could be because both sites are using similar application software (that use the same naming conventions).

    more likely, it's a coincidence (especially if you're noticing a common cookie name such as userid).

    some people freak out about cookies "tracking" their behavior, but if everyone turned off cookies, much of the web wouldn't work. analytics programs require cookies most of the time to track a user through a website. this might sound like an invasion of a user's privacy, but it helps web site builders build better websites, because it allows them to understand the behavior of users and where the problem spots are on a web site.

Still have questions? Get your answers by asking now.