Bypass CDN or Optimization in AJAX

If you have a conflict, and you need to bypass CDN or optimize functions in AJAX, you can either add some code to your theme's functions.php, or you can call the appropriate filter when using AJAX.

Add the following to your theme's functions.php file:

  • To bypass CDN
    defined( 'DOING_AJAX' ) && add_filter( 'litespeed_can_cdn', '__return_false' );
  • To bypass Optimize
    defined( 'DOING_AJAX' ) && add_filter( 'litespeed_can_optm', '__return_false' );

When using AJAX, you can call one of the above filters, and return false.

  • Admin
  • Last modified: 2018/07/10 14:11
  • by Lisa Clarke