Differences

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

Link to this comparison view

Both sides previous revision Previous revision
litespeed_wiki:cache:lscwp:bypass [2020/05/04 13:55]
Shivam Saluja
litespeed_wiki:cache:lscwp:bypass [2020/11/14 15:32] (current)
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== Bypass CDN or Optimization in AJAX ====== +~~REDIRECT>​https://​docs.litespeedtech.com/​lscache/​lscwp/​ts-cdn/~~
-**Please Note**: This wiki is valid for v2.9.x and below of the LiteSpeed Cache Plugin for WordPress. If you are using v3.0 or above, please see [[https://​docs.litespeedtech.com/​lscache/​lscwp/​overview/|the new documentation]]. +
- +
-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. +
- +
-===== In the Theme'​s Functions ===== +
-Add the following to your theme'​s ''​functions.php''​ file: +
-  * To bypass CDN <​code>​ +
-defined( '​DOING_AJAX'​ ) && add_filter( '​litespeed_can_cdn',​ '​__return_false'​ ); +
-</​code>​ +
-  * To bypass Optimize <​code>​ +
-defined( '​DOING_AJAX'​ ) && add_filter( '​litespeed_can_optm',​ '​__return_false'​ ); +
-</​code>​ +
- +
-===== Call the Filter ===== +
-When using AJAX, you can call one of the above filters, and return false. +
  • Admin
  • Last modified: 2020/05/04 13:55
  • by Shivam Saluja