Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Performance impact › Reply To: Performance impact
April 9, 2014 at 8:37 am
#1621
Keymaster
Hi!
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) {
console.log(response);
}, "json");
}
preCache()
setInterval(function(){
preCache();
}, 15000);
});
</script>
<?php
Clear your cache and CDN cache, and you shouldn’t see that long request anymore.