A cookie is said to be a user’s identity or information which is needed to interact between different web pages as well as track user’s navigation through the website pages. Whenever we enter any website on any web browser, their respective cookie is written on the hard disk.
Cookies are utilized to track user sessions, displays ads, remember user’s choice while accessing any website, remember and retrieve the user’s shopping cart, track the unique number of visitors, etc.
Assume an e-commerce site is accessible in many countries like US, Canada, Australia, and their testing is done in India. In that case, while testing the e-commerce site for various countries in India, at first respective countries cookies is set so that actual data like time zone etc., are accessed of that specific country.