_lscache_vary cookie

Table of Contents

The _lscache_vary cookie is a functional cookie used by LiteSpeed Cache to manage caching for different user states on websites. It serves the following purposes:

  1. Stores the role of a logged-in user

  2. Provides prevention of cached page

  3. Distinguishes between logged-in and non-logged-in users

This cookie is typically set with a 2-day expiration period. It helps the server determine which version of a cached page to serve to a user based on their login status.

The _lscache_vary cookie is essential for the proper functioning of LiteSpeed Cache, especially when dealing with different user roles and logged-in states on websites. It ensures that users receive the appropriate cached content based on their authentication status.

In some cases, such as when Guest Mode is enabled in WordPress, the _lscache_vary cookie may be set even for non-logged-in users to facilitate certain caching features which may cause an issue with users who don’t want cookies on their website and do not have a consent management banner to let users opt-in or opt-out as required by certain laws.

Written by: 

Online Privacy Compliance Made Easy

Captain Compliance makes it easy to develop, oversee, and expand your privacy program. Book a demo or start a trial now.