WP Rocket and Slider Revolution
WP Rocket is a premium cache plugin that optimizes website loading time without applying any coding. It is one of the market’s best cache and speed optimization plugins.
Slider Revolution and WP Rocket are fully compatible together. But even so, some issues may occur.
This is because WP Rocket has some features that put JavaScript files on hold until the page is loaded to improve the page loading speed.
However, Slider Revolution is a dynamic plugin that needs its JavaScript files earlier to manage the module loading process properly. As such, if WP Rocket defers those required JavaScript files, it may prevent modules from appearing as expected.
Note: Slider Revolution files are well optimized through minification, so they will not negatively impact page loading time even when loaded early.
Let’s see how to ensure Slider Revolution JavaScript files load as required using WP Rocket.
Important Note
The information in this guide was accurate as at May 2023, however it is currently being reviewed and may be updated soon.
Ensure Loading of Required JavaScript
To ensure the timely loading of Slider Revolution’s required files, we must exclude its JavaScript from WP Rocket’s Load JavaScript Deferred and Delay JavaScript Execution features.
Load JavaScript Deferred Function
WP Rocket’s Load JavaScript Deferred feature asks the user’s browser to wait until the page HTML content is loaded before loading JavaScript files. This HTML content is static, such as text in headings and paragraphs.
The files this option puts on hold include all JavaScript files, even minified ones. This option is beneficial to speed up your website loading time. Slider Revolution modules are dynamic rather than static, so they need their JavaScript files loaded first to properly handle animations, images, videos, special effects, etc.
Let’s move on to the solution that will load modules perfectly without impacting your website’s loading speed.
Exclude Slider Revolution Files From the Load JavaScript Deferred Function
Go to your WordPress website dashboard:

Go to the WP Rocket plugin from Settings on the left sidebar:

Click on the File Optimization tab:

Go to the JavaScript Files section:

Then, select the Load JavaScript Deferred checkbox:

There you can insert the keywords listed below into the Excluded JavaScript Files textbox provided, as shown in the attached screenshot below:
/jquery-?[0-9.]*(.min|.slim|.slim.min)?.js
/wp-includes/js/jquery/jquery-migrate.min.js

Click the Save Changes button:

Delay JavaScript Execution Feature
WP Rocket’s Delay JavaScript Execution feature is similar to its Load JavaScript Deferred feature, putting all JavaScript files on hold until there is user interaction. For example, if a module is added in the middle of the page, this option would only load its JavaScript files when a user scrolled down with the mouse wheel to that part of the page.
This option can also cause issues with a module’s images or videos not being loaded, as JavaScript is required to manage that content appropriately.
Let’s add Slider Revolution’s files to the exception box of WP Rocket so the feature doesn’t affect module functionality.
Exclude Slider Revolution Files from Delay JavaScript Execution
Go to your WordPress website dashboard:

Go to the WP Rocket plugin from Settings on the left sidebar:

Click on the File Optimization tab:

Go to the JavaScript Files section:

Then, select the Delay JavaScript Execution checkbox:

There you can insert the keywords listed below into the Delay JavaScript Execution textbox provided, as shown in the attached screenshot below:
/jquery-?[0-9.]*(.min|.slim|.slim.min)?.js
/wp-includes/js/jquery/jquery-migrate.min.js
/plugins/revslider/public/assets/js/
setREVStartSize
rev_slider_
revslider_

Click on the Save Changes button:

Contact Us
If you’re still encountering difficulty, don’t hesitate to contact our support team via support ticket or email (help@sliderrevolution.com); we’re always happy to help.
