What Are Cookies in Computer Language?
- Session cookies are the most common types of cookie on the web and are usually the cookies that expire the soonest. As their name suggests, session cookies only last as long as the user's visit to a particular website lasts, and expire once the user leaves the site.
- Persistent cookies do not expire when the user leaves the website. They are created once the user visits the site for the first time and are read by the web-server each time the user visits the site after the first. One common use of persistent cookies is store the user's username and password so that he is not required to manually enter them each time he visits the site. These cookies expire after a predetermined amount of time; this is determined by the web-server. However, you can manually delete all the cookies on your system through your web browser's options; this method of deleting cookies will disregard however long a persistent cookie was meant to last for and delete it.
- Secure cookies are used when the cookie may be transmitting sensitive data to the web-server. They tend to be used in much the same way as persistent cookies but offer that extra layer of encryption to protect sensitive data. These cookies can only be used in conjunction with HTTPS (the "s" stands for secure).
- In general, cookies are not harmful to your system. They is no way to create a cookie that acts as a virus or in anyway damages the system or browser. However, a cookie, depending on how it behaves, can aid spyware (malware that gathers and sends your personal information to an unknown server) in gathering your personal data. Examples of information that cookies have gathered in conjunction with spyware include, but are not limited to, website user names and passwords, email account credentials, and any other information that you would commonly enter into a text field on a website and is not encrypted properly. It should be noted that in these situations the cookie itself is not intended to compromise your information but is being exploited by the spyware.
Session Cookies
Persistent Cookies
Secure Cookies
Cookies and Security
Source...