1. Home
  2. Docs
  3. Website Firewall
  4. Troubleshooting
  5. Fixing PrestaShop Session Cache Issue

Fixing PrestaShop Session Cache Issue

As explained on item "Session Cookies" of the Troubleshoot Cache Issues article, you must set the Cache Level to “Site Caching” and add the following code to your .htaccess file:

# BEGIN Prevent Session Cookie Cache
    <ifModule mod_headers.c>
        Header append Vary "Cookie"
# END Prevent Session Cookie Cache

It will make obligatory the creation of a different cached versions of the pages depending on the value sent by the "Set-Cookie" header.

For NGINX or IIS servers, you should speak with your hosting provider to convert those .htaccess lines to NGINX or IIS rules.

Was this article helpful to you?