A cookie is a small piece of data sent from a website and stored on a user’s computer while the user is browsing the site. Cookies are a reliable method of a website remembering important data by recording the browser’s history. This can include buttons they click on and pages they visit, and also cookies remember certain information that has previously been filled in, such as names, addresses, credit card information, and even passwords.
A session cookie has a temporary lifespan, which is only while the user is browsing that current session. A user’s web browser will normally delete this cookie at the end of the session, as this cookie has no expiration date. Session cookies do improve page loading speed and are extensively used.
Persistent cookies have an expiry date, and they will transmit data whenever the user visits the website that the cookie belongs to. These cookies are also called tracking cookies as they can be used by advertisers to build up a user’s history of web use. Persistent cookies are also used to help keep a user logged on to their account, and by remembering data, it is not necessary to reenter information when returning to the site.
Persistent cookies are used for multiple language sites, as the cookie will remember which language the user selected, and the next time they visit the site, it will appear in their previously selected language. These cookies speed up the browsing process by remembering login information and preferences
Cookie privacy and security
Cookies are not viruses, they are made up of plain text, and as they are not compiled code, they cannot be executed, or copy themselves, so are not classified as viruses. A cookie can be used for malicious purposes, as it records a user’s browsing history. Unscrupulous web developers can sell this information to Internet marketing companies, however, the new rules make this very difficult, as the user must clearly give their permission in order to accept cookies.
Cookies are necessary for shopping cart websites, as the cookie will retain the user’s data while they are free to browse different pages of the site. Without the use of a session cookie, any item the user has put in their shopping cart would be lost if they visited another page.