Helpdesk
/
Wp Edition

How to configure LiteSpeed Cache with My Agile Privacy

LiteSpeed Cache is a popular and powerful WordPress caching plugin, often used in combination with LiteSpeed web servers. It offers numerous features to improve site performance: page caching, minification and combination of CSS and JavaScript files, deferred script loading, image optimisation, databases and much more.

With the correct settings, LiteSpeed Cache can work in synergy with My Agile Privacy, guaranteeing both optimal performance and full GDPR compliance. Below, we'll see how to adjust the LiteSpeed Cache options to avoid conflicts with the privacy plugin.

Excluding JavaScript files

To ensure My Agile Privacy works correctly, you need to exclude some JavaScript files from LiteSpeed Cache optimisations.
You will need to exclude these files from both minification and lazy loading.

From the admin panel of your WordPress site, go to LiteSpeed Cache > Page Optimization.
Here, find the JS Excluded section and enter the following strings (one per line):

/wp-content/plugins/myagileprivacy/frontend/js/my-agile-privacy-frontend.js
/wp-content/plugins/myagileprivacy/frontend/js/anime.js
/wp-content/local-cache/my-agile-privacy/cookie-shield.js
/wp-content/local-cache/my-agile-privacy/MyAgilePrivacyIabTCF.js
/wp-content/plugins/myagileprivacy/local-cache/my-agile-privacy/cookie-shield.js
/wp-content/plugins/myagileprivacy/local-cache/my-agile-privacy/MyAgilePrivacyIabTCF.js
/wp-content/plugins/myagilepixel/frontend/js/myagilepixel.js
/wp-content/local-cache/my-agile-pixel/cookie-shield.js
/wp-content/local-cache/my-agile-pixel/myagilepixel.js
/wp-content/plugins/myagilepixel/local-cache/my-agile-pixel/cookie-shield.js
/wp-content/plugins/myagilepixel/local-cache/my-agile-pixel/myagilepixel.js
Markup

On the same page, select the option JS deferred / delayed exclude and re-insert the same list of files.

Remember to save your changes before moving on to the next step.

Excluding CSS files

To avoid rendering problems with the cookie banner and other My Agile Privacy features, you'll need to exclude its CSS files from LiteSpeed Cache optimisations.

From LiteSpeed Cache > Page Optimisation, open the ‘[9] CSS Optimisation’ tab.

Find the CSS excluded option and enter the following strings (one per line):

/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-frontend.css
/wp-content/plugins/myagileprivacy/frontend/css/my-agile-privacy-notification-bar.css
/wp-content/plugins/myagilepixel/frontend/css/mapx.css
/wp-content/plugins/myagileprivacy/frontend/css/animate.min.css
Markdown

Again, remember to save your changes.

Finally, depending on your version of LiteSpeed Cache and its active settings, you may need to disable the following options to ensure full compatibility:

  • CSS minification
  • Combine CSS
  • Asynchronous loading of CSS

If you have any doubts or difficulties, you can always contact our support service, or that of LightSpeed Cache, to receive the necessary support.

a Formula Agile SRL project
COE / TAX ID 31366
Via Tre Settembre, 99 - 47891 Dogana - San Marino - RSM
Share capital 26'000€
For assistance: info[at]myagileprivacy.com
GDPR and privacy present complexities that extend beyond achieving website compliance. Compliance obligations span across all business aspects and necessitate expert analysis.
When it comes to implementing Banners and Policies, trust My Agile Privacy—the only solution that excludes unnecessary implementations not mandated by regulations.
Logo CMP partner GoogleLogo CMP partner GoogleLogo IAB Europe approvedLogo IAB Europe approved
My Agile Privacy

This site uses technical and profiling cookies. 

You can accept, reject, or customize the cookies by clicking the desired buttons. 

By closing this notice, you will continue without accepting. 

In addition, this site installs Google Analytics version 4 (GA4), Facebook Remarketing with anonymous data transmission via proxy. 

By giving your consent, the data will be sent anonymously, thus protecting your privacy.