Using a caching plugin is a great way to speed up your website, but sometimes it can prevent dynamic content, like your OptinMonster campaigns, from displaying correctly. To make sure your campaigns always appear as expected, you may need to tell your caching plugin not to optimize OptinMonster’s resources.
In this guide, you’ll learn how to exclude OptinMonster resources from many popular caching plugins.
Understanding Caching and OptinMonster
Before we dive into the steps, let’s quickly talk about what caching is. Think of it like your website taking a snapshot of a page. When a visitor arrives, your site shows them that quick snapshot instead of having to build the page from scratch every time. This makes your site load much, much faster!
To ensure OptinMonster functions correctly, you’ll need to prevent your caching plugin from changing our key JavaScript files. The setting in your plugin might be called exclude JavaScript files, exclude from minification, or exclude from defer.
You’ll need to exclude the script: a.omappapi.com/app/js/api.min.js
Below, you will find links to the official instructions for many popular caching plugins to help you find where to add these exclusions.
WP Rocket
WP Rocket makes it simple to exclude our scripts from its file optimization features. You can follow their official guide to learn how to add the OptinMonster resources to the exclusion lists in their settings.
View WP Rocket’s guide on excluding files from load Javascript deferred.
NitroPack
NitroPack has a dedicated section for excluding resources from optimization. It’s important to note that NitroPack’s Ludicrous mode can be very aggressive and may override some exclusion rules. If you’re having trouble, you may need to disable Ludicrous mode first from NitroPack’s settings menu.
View NitroPack’s guide on excluding resources.
Cloudflare
If you’re using Cloudflare’s CDN, you can use its Page Rules feature to prevent certain resources from being cached. You can create a rule to bypass the cache for URLs containing OptinMonster’s script.
Learn how to create Page Rules in Cloudflare.
SiteGround Optimizer
The SiteGround Optimizer plugin has settings to exclude JavaScript files from minification. You can find these options in the plugin’s Frontend Optimization tab.
Check out SiteGround’s tutorial on their caching options.
LiteSpeed Cache
LiteSpeed Cache provides detailed tuning settings within its Page Optimization section. You can add the OptinMonster URLs to the list of excluded JavaScript files.
View the LiteSpeed Cache documentation for tuning optimizations.
W3 Total Cache
W3 Total Cache has many settings, but you’ll want to focus on the Minify section. There, you can specify JavaScript files that should never be minified, ensuring OptinMonster’s scripts are left untouched and run as intended.
Read the W3 Total Cache settings guide.
WP-Optimize
With WP-Optimize, you’ll want to look for the settings related to minifying JavaScript files. You can add our scripts to the exclusion list there to prevent them from being minified or merged with other scripts.
Learn how to exclude files from minification in WP-Optimize.
Hummingbird
The Hummingbird plugin has a powerful Asset Optimization feature. Within its settings, you can add exclusions to prevent it from compressing or modifying OptinMonster’s files.
See Hummingbird’s guide on Asset Optimization exclusions.
Breeze
Breeze, the caching plugin from Cloudways, includes options to exclude URLs and specific JavaScript files from minification in its Advanced Options tab.
Read more about Breeze’s advanced caching options.
Jetpack
Jetpack’s Site Accelerator feature speeds up static file load times. However, it does not currently offer a way to exclude specific files. If you find that your campaigns are not loading correctly, we recommend deactivating the Speed up static file load times option in your Jetpack settings.
Comet Cache
Comet Cache includes an HTML compressor that can affect scripts. To prevent issues, you’ll need to add an exclusion for the OptinMonster script to prevent it from being compressed or altered by this feature.
View the Comet Cache guide on excluding parts of your site.
Powered Cache
Comet Cache allows you to exclude specific URLs or URI patterns from being minified. You can find these settings in the plugin’s Javascript Optimization panel.
View the Powered Cache guide on excluding parts of your site.
Clearfy Cache
The Clearfy plugin offers performance optimization features, including minifying JavaScript. It’s important to add the OptinMonster script to the exclusion list to prevent it from being minified and ensure your campaigns display correctly.
View the Clearfy Cache guide on excluding parts of your site.
Other Caching Plugins
Many other caching plugins offer similar exclusion settings. We recommend looking through your plugin’s documentation or settings panel for sections labeled Exclusions, Bypass, or Advanced to add the OptinMonster scripts.
Some plugins, such as Simple Cache, Hyper Cache may offer limited or no exclusion options. If you are using one of these and experience issues, you may need to disable the plugin or switch to a caching plugin with more granular controls.
FAQs
Will excluding OptinMonster’s files slow down my site?
Not at all! OptinMonster’s scripts are already highly optimized and load asynchronously, which means they don’t block your other content from loading. Excluding them from your site’s cache simply ensures you are always getting the most up-to-date version of our code so your campaigns run smoothly.
Why do I need to do this? My campaigns seem to be working.
Caching plugins store a static version of your site’s files to serve them to visitors more quickly. However, OptinMonster relies on dynamic scripts to target and display campaigns correctly. If an old version of our script is cached, it can lead to campaigns not appearing, targeting rules failing, or other unexpected behavior. It’s a proactive step to ensure everything always works perfectly.
What if my caching plugin isn’t on this list?
No problem! The list above covers many common plugins, but it’s not exhaustive. Almost every caching plugin includes a settings area where you can specify files or scripts to exclude from caching. Just look for a section in your plugin’s settings labeled Exclusions, Advanced, or something similar, and add the OptinMonster resources mentioned at the start of this guide.
If you’re serious about jumpstarting your website business growth, then get started with OptinMonster today!
Get Started With OptinMonster Today!BONUS: Done-For-You Campaign Setup ($297 value)
Our conversion experts will design 1 free campaign for you to get maximum results – absolutely FREE!
Click here to get started →