Posted in:
Magento 2 Tutorials
How to set Cookie Lifetime in Magento 2
Cookie Lifetime value enters in the seconds. Therefore, it will remain "live" if the customer returns to the website within this timescale. However, if the cookie expires, information like Cart/Checkout/Details is no longer available to the customer.
To know how you can set cookie lifetime for your online Magento 2 store, go with the following steps:
Steps for the set Cookie Lifetime:
- Step 1: Login with your Admin panel
- Step 2: Go on the sidebar and click on the Stores option
- Step 3: Then go on the Settings > Configuration
- Step 4: Then expand the General tab and then click on the Web option
- Step 5: Then select the Default Cookie Settings section
- Step 6: Then go on the Cookie Lifetime field
- In that first uncheck the Use System Value checkbox.
- Then in that textbox, enter the cookie lifetime in seconds.
- Step 7: If you are done with these configuration then click on the Save Config button.
October 6, 2021
Did you like this post?