Prevent Wordpress plug-ins from caching your client code

  • Updated

If you are using Wordpress, some Wordpress plug-ins have been known to cache the Mutiny script running on your website. Unfortunately, this causes any changes (e.g. new experiences launched, changes made to existing experiences, etc.) to not deploy for your website visitors and may also cause issues with other things like conversions. Luckily, it is usually easy to resolve any caching by making a few edits in the settings of your Wordpress plug-in.

 

How to know if your client code is cached

The <script> src= portion of your Mutiny client should look something like this, with the "uniqueidentifier" at the end being a unique ID for your Mutiny account:

<script src="https://client-registry.mutinycdn.com/personalize/client/uniqueidentifier.js"></script>

If a Wordpress plug-in is caching the Mutiny script, it won't appear like the code above. Instead, it will likely look like a different URL altogether and have "wp-engine" or "wp-content" within that URL. Here's an example of what it may look like.

<script src="https://www.mywebsite.com/wp-content/cache/min/1/personalize/client/uniqueidentifier.js?ver=1690521554"></script>

Prevent Wordpress from caching the client code

This will differ depending on the specific plug-in that is caching your script. From a high level, you will want to exclude Mutiny from caching within your plugin settings. You should be able to locate a settings screen where you can make exclusions. We've included specific examples below, but if you have trouble finding these for a specific plugin, reach out to support@mutinyhq.com.

 

Wordpress Rocket

Wordpress Rocket is a common plug-in where we encounter script caching. Within this plug-in, you can exclude the Mutiny script from minifying, deferment, and delay by adding these to the exclusion boxes under the File Optimization tab. You'll want to specifically exclude client-registry.mutinycdn.com and the keyword mutiny.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.