Reply To: Performance impact



I think I have found the reason. If I’m guessing right, then you had an older version of the search installed, where “Image Precache” was enabled. I left that code in the search in case someone needs it, but it cannot be disabled from the frontendt. Anyways, all you need to do is delete a few lines, and that empty 1,2s ajax request will disappear.

Open up the wp-content/plugins/ajax-search-pro/ajax-search-pro.php file.

Delete lines 232-250:

      if (get_option('asp_precacheimages')!=1) return;
      <script type='text/javascript'>
         $(document).ready(function($) {
            function preCache() {
              var data = {
            	  action: 'ajaxsearchpro_precache'  
            	$.post(ajaxsearchpro.ajaxurl, data, function(response) {
            	}, "json"); 
            }, 15000);

Clear your cache and CDN cache, and you shouldn’t see that long request anymore.

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)