Advertisement
swte

Disable AJAX cache on particular pages

Nov 1st, 2023
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. add_filter('swift_performance_is_cacheable_ajax', function($result){
  2.     if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] === 'https://yoursite.com/sample-page/') {
  3.         return false;
  4.     }
  5.     return $result;
  6. });
  7.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement