Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:cache:lscwp:bypass [2018/07/10 13:17]
Eric Leu created
litespeed_wiki:cache:lscwp:bypass [2018/07/10 14:11]
Lisa Clarke Proofreading and Reformatting
Line 1: Line 1:
-If there'​s any reason like conflict and you need to bypass CDN or optimize, you can use following method+====== Bypass CDN or Optimization in AJAX ====== 
 +If you have a conflictand 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.
  
-  - In your theme'​s ''​functions.php'':​  +===== In the Theme'​s Functions ===== 
-    * To bypass CDN <​code>​+Add the following to your theme'​s ''​functions.php'' ​file
 +  * To bypass CDN <​code>​
 defined( '​DOING_AJAX'​ ) && add_filter( '​litespeed_can_cdn',​ '​__return_false'​ ); defined( '​DOING_AJAX'​ ) && add_filter( '​litespeed_can_cdn',​ '​__return_false'​ );
 </​code>​ </​code>​
-    ​* To bypass Optimize <​code>​+  ​* To bypass Optimize <​code>​
 defined( '​DOING_AJAX'​ ) && add_filter( '​litespeed_can_optm',​ '​__return_false'​ ); defined( '​DOING_AJAX'​ ) && add_filter( '​litespeed_can_optm',​ '​__return_false'​ );
 </​code>​ </​code>​
-  - Or call the filter when using AJAX and return false to bypass CDN/​Optimize+ 
 +===== Call the Filter ===== 
 +When using AJAX, you can call one of the above filters, ​and return false
  • Admin
  • Last modified: 2020/11/14 15:32
  • by Lisa Clarke