Table of Contents
WP Rocket and Slider Revolution
WP Rocket is a premium cache plugin that optimizes website loading time, without applying any coding, and it is one of the best cache and speed optimization plugins on the market.
Slider Revolution and WP Rocket are fully compatible together. But even so, there are some issues that may occur.
The reason for this is that WP Rocket has some features that put JavaScript files on hold until the page is loaded, in order to improve the page loading speed.
However, Slider Revolution is a dynamic plugin that needs its JavaScript files earlier in order to properly manage the module loading process. 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 even when loaded early they will not negatively impact page loading time.
Let’s see how to make sure Slider Revolution JavaScript files load as required when using WP Rocket.
Solutions to Ensure Loading of Required JavaScript
To ensure timely loading of Slider Revolution’s required files we need to exclude its JavaScript from both 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 content such as text in headings and paragraphs.
The files this option puts on hold include all JavaScript files, even minified ones. This option is exceptionally useful to speed up your website loading time, but Slider Revolution modules are dynamic rather than static, so they need their JavaScript files loaded first in order 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, with the difference that it puts 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 properly manage that content.
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 any difficulty, don’t hesitate to contact our support team via support ticket or email ([email protected]), we’re always happy to help.
Hello, when I delay the execution of javascript the product images disappear, is there any solution about it? Thank you
Hello,
thanks for contacting us! Your request requires one of our support agents to have a closer look.
In order to give our clients the best support possible, we are having a support ticket system reachable via the link below.
Please use it for your upcoming questions concerning one of our products. This will guarantee the fastest answer possible. Support requests here cannot be answered unfortunately. Thank you!
Please use our ticket systems over at:
https://support.sliderrevolution.com
Cheers Dirk @ Slider Revolution