1. How are cookies used in Magento?
Cookies are stored on the user’s browser and are used to store information about a user’s session. With Magento, cookies will hold persistent cart information, customer information, and some customer preference information.
2. What customer’s data is saved in cookies, and how is it used in the storefront using Magento native functionality?
- CART — The association with your shopping cart.
- CATEGORY_INFO — Stores the category info on the page, that allows to display pages more quickly.
- COMPARE — The items that you have in the Compare Products list.
- CURRENCY — Your preferred currency
- CUSTOMER — An encrypted version of your customer id with the store.
- CUSTOMER-AUTH — An indicator if you are currently logged into the store.
- CUSTOMER-INFO — An encrypted version of the customer group you belong to.
- CUSTOMER-SEGMENT-IDS — Stores the Customer Segment ID
- EXTERNAL-NO-CACHE — A flag, which indicates whether caching is disabled or not.
- FRONTEND — You sesssion ID on the server.
- GUEST-VIEW — Allows guests to edit their orders.
- LAST-CATEGORY — The last category you visited.
- LAST-PRODUCT — The most recent product you have viewed.
- NEWMESSAGE — Indicates whether a new message has been received.
- NO-CACHE — Indicates whether it is allowed to use cache.
- PERSISTENT-SHOPPING-CART — A link to information about your cart and viewing history if you have asked the site.
- POLL — The ID of any polls you have recently voted in.
- POLLN — Information on what polls you have voted on.
- RECENTLYCOMPARED — The items that you have recently compared.
- STF — Information on products you have emailed to friends.
- STORE — The store view or language you have selected.
- VIEWED-PRODUCT-IDS — The products that you have recently viewed.
- WISHLIST — An encrypted list of products added to your Wishlist.
- WISHLIST-CNT — The number of items in your Wishlist.
— Amasty via StackOverflow