Title: Litespeed cache settings
Last modified: January 20, 2021

---

# Litespeed cache settings

 *  Resolved [ickyguy](https://wordpress.org/support/users/ickyguy/)
 * (@ickyguy)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/litespeed-cache-settings/)
 * When configuring the Litespeed cache plugin for wordpress (minifying/aggregating
   CSS & JS etc) the cookies and content security policy plugin does not seem to
   have access to the users cookie settings. The following error is in the console:
 * Refused to load the script ‘[https://www.googletagmanager.com/gtag/js?id=G-XXX&#8217](https://www.googletagmanager.com/gtag/js?id=G-XXX&#8217);
   because it violates the following Content Security Policy directive: “script-
   src ‘self’ ‘unsafe-inline’ ‘unsafe-eval’ [https://*.mailerlite.com&#8221](https://*.mailerlite.com&#8221);.
   Note that ‘script-src-elem’ was not explicitly set, so ‘script-src’ is used as
   a fallback.
 * (Mailerlite.com is the only path in the “always on”-domains.)
 * I have excluded the following files from CSS/JS aggregation:
    cookies-and-content-
   security-policy.min.css js.cookie-2.2.1.min.js cookies-and-content-security-policy.
   min.js
 * Have I missed any file to exclude?
    (Custom formatting done in admin also disappears,
   but I can live with that)
 * Best regards,
 * /O

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/litespeed-cache-settings/#post-13934941)
 * [https://www.googletagmanager.com/](https://www.googletagmanager.com/) should
   be added to script, I suggest Marketing.
 * [https://*.mailerlite.com&#8221](https://*.mailerlite.com&#8221) should be [https://*.mailerlite.com/](https://*.mailerlite.com/)
 * You seem to have excluded the right files, even though I don’t think you need
   to.
 * Post the link if you want me to take a look at it.
    -  This reply was modified 5 years, 4 months ago by [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/).
 *  Thread Starter [ickyguy](https://wordpress.org/support/users/ickyguy/)
 * (@ickyguy)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/litespeed-cache-settings/#post-13936330)
 * Thanks for your swift reply!
 * The mailerlite url is correct in the plugin, it was this forum that added the
   hashtag and the numbers. The following domains is in “Statistics” (I only use
   tag manager for statistics-script/images):
 *     ```
       https://*.google-analytics.com
       https://*.googletagmanager.com
       https://tagmanager.google.com
       https://www.googletagmanager.com/gtag/js
   
       https://*.google-analytics.com
       https://*.googletagmanager.com
       https://*.gstatic.com
       https://www.googletagmanager.com/gtag/js
       ```
   
 * The error seems to occur on some pages, but not all, especially if the user changes
   the settings “mid session”.
 * I do have the notice “Aktivera pluginet för att använda det.” in the activation
   tab. It is however activated in WP and in the plugin (and working when Litespeed
   chache plugin is disabled).
 * The site is [https://www.ikigai.se](https://www.ikigai.se). The cache is purged
   as of now.
 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/litespeed-cache-settings/#post-13936373)
 * You should remove “gtag/js” from your [https://www.googletagmanager.com/gtag/js](https://www.googletagmanager.com/gtag/js),
   so it only says [https://www.googletagmanager.com/](https://www.googletagmanager.com/).
   Only domains should be under domains, not full urls or paths.
 * Maybe the cookie itselt if being cached? I had that problem with hosting sites
   at WP Engine. So everytime I set up a site with them I have to ask them to uncache
   the cookie “cookies_and_content_security_policy”. Maybe you can do that in your
   plugin, or maybe with your hosting.
 * Is this the Litespeed cache plugin you are using: [https://wordpress.org/plugins/litespeed-cache/](https://wordpress.org/plugins/litespeed-cache/)?
 *  Thread Starter [ickyguy](https://wordpress.org/support/users/ickyguy/)
 * (@ickyguy)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/litespeed-cache-settings/#post-13936653)
 * Finally!
 * It was a cookie cacheing problem!
 * There is an option in the plugin (under Cache/Excludes) to enter cookies not 
   to be cached. Now it seems to work as intended (custom colours not working though
   but that’s OK).
 * Yes, that’s the plugin.
 * Thanks!
 * /O
 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/litespeed-cache-settings/#post-13936695)
 * Perfect [@ickyguy](https://wordpress.org/support/users/ickyguy/)!
 * Please consider leaving a [review](https://wordpress.org/support/plugin/cookies-and-content-security-policy/reviews/).
   🙂
 *  Plugin Author [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * (@jonkastonka)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/litespeed-cache-settings/#post-13946301)
 * Thanks for the review! 🙂
 * I have updated [the FAQ](https://wordpress.org/plugins/cookies-and-content-security-policy/#the%20settings%20does%20not%20seem%20to%20have%20an%20effect.%20what%20do%20i%20do%3F)
   with information about caching in plugins that we learned.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Litespeed cache settings’ is closed to new replies.

 * ![](https://ps.w.org/cookies-and-content-security-policy/assets/icon-256x256.
   png?rev=2414719)
 * [Cookies and Content Security Policy](https://wordpress.org/plugins/cookies-and-content-security-policy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookies-and-content-security-policy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookies-and-content-security-policy/)
 * [Active Topics](https://wordpress.org/support/plugin/cookies-and-content-security-policy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookies-and-content-security-policy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookies-and-content-security-policy/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Johan Jonk Stenström](https://wordpress.org/support/users/jonkastonka/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/litespeed-cache-settings/#post-13946301)
 * Status: resolved