A cookie is a file stored on the user’s hard drive that enables the web server to recognise the user from one web page to another. Websites use cookies to keep a users’ session open (along with any preferences) while browsing the site.