Preload search results

This topic contains 10 replies, has 2 voices, and was last updated by

 
Participant
3 years, 11 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #16823

    Participant

    I was wondering if there are any additional tweaks that I can do to speed up search. For instance I have a search right now that looks at the brokers post type and only have 1 broker. When typing it take a sec or so to show. I was playing around with your settings and noticed that you have
    Layout Options > Auto Populate > Display results by default when the page loads (auto populate). I like the idea of populating the search when page loads just not seeing the results until user types. Or start loading search items on field focus in the back ground.

    Let me know if there is anything else I could do to speed up.

    Thanks!

    #16824

    Hi!

    I believe you are looking for this: Documentation – Fine tuning the search configuration
    There are a few methods, especially in section 1 and 2, that may further improve the performance.

    Pre-loading results is not yet possible. There will be a separate interface within the next 3-4 major releases to allow instant search on certain conditions.

    Best,
    Ernest Marcinko

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


    #16826

    Participant

    Thanks for the tips.

    I notice that the jquery.ajaxsearchpro.min.js loads on all pages. I’m only loading the ajax search pro on one page on my site.

    How can you just load the jquery.ajaxsearchpro.min.js for just the pages which are using the ajax search pro?

    Thanks!

    -Steve

    #16827

    Hi Steve,

    That might be a bit difficult, as in WordPress not ever page has an ID (archives, front etc..). It is however possible to de-register them via a custom code.
    I have put together a small custom snippet, which may cover most use cases. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

    Change the $allowed_pages variable to the array of page IDs where you need the search scripts, as well as the $allowed_on_home variable, if the search script should be allowed on the home page.

    Best,
    Ernest Marcinko

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


    #16830

    Participant

    Hi Ernest:

    That code works. I would be nice to have check box option to include ajax js globally. If unchecked it would only load on the specific page. That’s how some my other plugins work.

    Thanks!

    -Steve

    #16834

    Hi Steve,

    I will definitely consider adding a feature to the compatibility options menu to enabled/disable the plugin on some front-end pages.

    Best,
    Ernest Marcinko

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


    #16835

    Participant

    Hi Ernest,

    Thanks for your reply. I did notice that the plugin also places the Ajax Pro css files on all the pages. Is there a way to remove the css from loading on all pages?

    <link rel=’stylesheet’ id=’wpdreams-asp-basic-css’ href=’//www.fieldslre.com/wp-content/plugins/ajax-search-pro/css/style.basic.css?ver=zeXszJ’ type=’text/css’ media=’all’ />
    <link rel=’stylesheet’ id=’wpdreams-asp-chosen-css’ href=’//www.fieldslre.com/wp-content/plugins/ajax-search-pro/css/chosen/chosen.css?ver=zeXszJ’ type=’text/css’ media=’all’ />

    Thnkas!

    -Steve

    #16836

    Hi!

    Sure, this modified version should get rid off those as well:

    Best,
    Ernest Marcinko

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


    #16837

    Participant

    Hi Ernest:

    For some the css is still showing up on all pages.

    -Steve

    #16853

    Hi!

    Indeed, try this one:

    Best,
    Ernest Marcinko

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


    #16864

    Participant

    HI Ernest:

    That works! I would highly recommend in a next version to include ajax pro files globally or specific pages.

    Thanks again!

    -Steve

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.