Extra Options

Ajax Loading (Page caching compatibility)

The Ajax loading/page caching compatibility option allows you to use dynamic content while continuing to enjoy the advantages of caching.

With the Page Caching Compatibility option enabled, dynamic triggers will be rendered in a separate request that will happen after the loading of the cached version (you can learn more here about How Ajax Works).

Enabling Ajax Loading is possible for all triggers together or for only one specific trigger

There are two options to enable Ajax loading (page caching compatibility): Via the plugin settings for all trigger together or by adding a parameter to the shortcode of a specific trigger.

Enable Ajax page caching loading for all the triggers

On your WordPress Dashboard, go to If-So > Settings and check the “Render triggers via Ajax” checkbox.

If you have an If-So shortcode pasted inside another If-So trigger, and you set If-So to load triggers with Ajax, you need to make sure the nested shortcode is not loading with Ajax. In order to do so, simply add the parameter ajax=”no” to the nested shortcode.

Enable Ajax for specific trigger

To make a specific trigger load with Ajax you can add the parameter ajax=”yes” to the trigger shortcode:

[ifso id="123" ajax="yes"]

Want to enable Ajax on a trigger that is embedded using PHP directly in the page template (for developers)? Click here

Will Ajax Loading Mode cause the dynamic content to be displayed in delay?

When Ajax Loading is enabled, the static content of the page is served from the cache, and the dynamic content is rendered moments after. Naturally, there will be a delay between the loading time of the two. The length of the delay depends on numerous factors, like the way your site is built, your server, the amount of the dynamic content, and so on.

Adding an Animated Loader

If you experience the delay between the loading of the page from the cache and the loading of dynamic content as too long, you may want to show an animated loader during this time gap.

Showing the loader is possible in two ways: 1. Add a loader to all triggers, or, 2. Add a loader to individual triggers. To start, let’s add a loader to All Triggers.

Option 1: Add a loader to all the triggers on your site through the plugin’s settings

  1. Go to If-So > Settings on your WordPress Dashboard.
  2. Find the AJAX Loader Animation, and select the loader style.
  3. Save the settings at the bottom of the page.

Option 2: Set or remove a Loader Animation on an individual trigger

Add the parameter loader=”X” to the trigger’s shortcode (possible values instead of X are 0,1, or 2). Adding the parameter to the shortcode will override the selected option in the plugin’s settings.

Loader styles:

loader =”0″

No loader



Changing the loader size

Changing the loader size is possible by changing the width and height attributes of the CSS Class .lds-dual-ring:after

.lds-dual-ring:after {
width: 12px;
height: 12px;
  • Was this Helpful ?
  • YesNo
Ready to get started?
Try it on your website