Magento Tutorials

How to Configure Session Cookie Management in Magento

What is Session Cookie?

A short-term session cookie exists for the duration of a single visit to your site, and expires when the customer leaves, or after a set period of time.

Cookie and session management is an important aspect of any e-commerce store. Everything from a customer’s cart, checkout process and recently viewed products is made possible by knowing who is using the website. This is where cookies come into play.

How to configure Session Cookie Management in Magento

In your Magento backend, go to System > Configuration. On the left menu, under General section, click Web.  The Session Cookie Management options specify how and where cookies are set and used in your Magento store.

Session Cookie Management
  • Cookie Lifetime is the time a cookie will remain ‘alive’ if the customer returns to the website within this timescale (in seconds) their cart/checkout/details will have been stored. If the cookie expires that information is no longer available to the customer.
  • Cookie Path will usually just need a forward slash “/”, that means the cookie will be available across the domain and nto be limited to a specific directory.
  • The Cookie Domain will usually be your domain name preceded by a dot, and excluding the “www”. This means the cookie will be available on all sub domains.
  • Use HTTP Only should usually be set to ‘yes’, this means that the cookie will remain active as the user switches between http:// and https://. If this is set to ‘no’ you will experience the customer’s cart emptying as they switch between non-SSL and SSL versions of the site, which is usually when clicking through through to the checkout.
  • Cookie Restriction Mode will notify your visitors that cookies are required for full-featured operations. It relates specifically to EU cookie directive.

Read more:
How to Configure Layered Navigation with Filterable Attributes in Magento 2
How to Configure Price Filter – Price Navigation in Magento 2