Conditional Script Loading

Conditional Script Loading

18/05/2018

If you have the Layer or Revolution Slider installed, their scripts will load on each and every page of your site, even if the slider is not assigned to one of those pages. This is the default behavior of both of these sliders, and is not related to the theme. The good news is that both of them offer a way to only load the scripts on pages that have the slider on them. Continue reading below to learn how to set this feature up.

How To Configure The Revolution Slider

Step 1 - Go to the Revolution Slider tab in your admin sidebar.

Step 2 - In the upper right corner, click the Global Settings button.

Step 3 - Switch the 'Include RevSlider Libraries Globally' option off. You can also choose to manually add which pages to include RevSlider libraries.

Step 4 - Click the Update button to save all your changes.

How To Configure The Layer Slider

Step 1 - Go to the LayerSlider WP tab in your admin sidebar.

Step 2 - Expand the 'Troubleshooting & Advanced Settings' section.

Step 3 - Switch the 'Conditional Script Loading' option on.

Step 4 - Click the Save Changes button to save all your changes.

IMPORTANT NOTE: On page speed test like Google Page Speed, loading scripts on all pages can result in Render Blocking errors. Using the above option will reduce those errors on pages that do not have a Layer or Revolution Slider. However, using these options can cause other conflicts. If you see issues, it is recommended to keep them on.

Recent Posts

Recent Tweets

For privacy reasons Twitter needs your permission to be loaded. For more details, please see our Privacy Policy.
I Accept