Common Issues

Exclude Code from Caching

If your website is using a cache/performance optimization plugin, then it might combine/minify JavaScript (or/and CSS) and move them into the footer of your page. Then the preloader may not work properly.

Because the JavaScript (and CSS) of LoftLoader needs to be put in the < head > of a page so it can be executed as soon as possible. Many cache/performance optimization plugins have the “exclude” feature which allows to skip some code and files from being aggregated and minimized. To solve this kind of problem, please:

1. Exclude Inline JavaScript

Please add the following 2 lines to “Exclude Inline JavaScript”.

In the settings panel of a cache plugin, please find File Optimization (or Optimization – it may be different in each cache plugin) > Exclude Inline JavaScript.

loftloaderPro
loftloaderCache

  
Then, please always clear your site cache and browser cache after making changes, then refresh page and check again.


2. Exclude JavaScript files of LoftLoader

If the problem still persists after excluding inline JavaScript, then please also exclude the JavaScript files of LoftLoader.

loftloader-pro/assets/js/jquery.waitformedias.min.js
loftloader-pro/assets/js/loftloader.min.js
wp-includes/js/jquery/jquery.js

  
About the third line of the above code:

wp-includes/js/jquery/jquery.js

  
Some cache plugins may have the option to enable/disable merging jQuery library. If yes, please disable merging jQuery library. If not, please add the third line of code to manually exclude jQuery.


3. Exclude CSS files and inline CSS of LoftLoader

To ensure that LoftLoader works properly, you may also need to exclude the CSS files and inline CSS of LoftLoader.

Exclude styles (CSS files):

loftloader.min.css

  

Exclude inline styles:

loftloader-wrapper

  

Then, please always clear your site cache and browser cache after making changes, then refresh page and check again.