Cookies are small files containing data sent by a website to store in user’s browser. Cookies are widely used on the web for storing information and providing a personalized browsing experience to users.
The cmon types of cookies are; Magic cookies and HTTPS cookies
Magic cookies are an old computing term that refers to packets of information that are sent and received without changes. Commonly, this would be used for a login to computer database systems, such as a business internal network.
This concept predates the modern “cookie” we use today while HTTP cookies are a repurposed version of the “magic cookie” built for internet browsing. Web browser programmer Lou Montulli used the “magic cookie” as inspiration in 1994. He recreated this concept for browsers when he helped an online shopping store fix their overloaded servers.
- To remember a user’s login credentials
- To remember information like the items a user saw on a website, items they added to cart, name or email address they used on the website, etc.
Any user can delete cookies from their web browser by going to the privacy section on their browser’s settings.
By default, WordPress generates two types of cookies.
- Session cookies
- Comments cookies
Session cookies are set when a user logs in to a WordPress site. These cookies contain a user’s authentication details, and the settings for the admin area interface. Login cookies in WordPress expire every 15 days.
When a user leaves a comment on a WordPress powered website, WordPress automatically sets a cookie containing user’s name, email address, and URL. This cookie allows WordPress to automatically fill username, email, and URL fields on the user’s subsequent visits.
WordPress plugins may use the information stored in the default cookies to provide personalization features. Plugins may also store their own cookies.