• ankur123321

    (@ankur123321)


    I am using Ajax search lite on my homepage, and archive page. But it is loading thier CSS and JS on every page of my website, which is significantly reducing the website performence. It is loading a total of 6 javascript file and 2 CSS unnecessarily on every page whether it is used or not.

    If anyone has the solution to this problem then plz share or if this any bug then also let me know.

Viewing 1 replies (of 1 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi Ankur,

    The best way to tackle these is via using a cache plugin – those usually have a feature to exclude certain scripts on certain pages.

    It’s not a bug per se, as it is not possible to determine wether the search is actually used on the page before the header is loaded – and that’s where the assets (CSS) needs to be placed. Therefore the only way for most plugins is to enqueue the assets.

    In the Pro version we are testing a feature which captures the output and detects wether the CSS and JS should be included. So far it’s working great, so this feature will be also added to the Lite version in the future once it’s stable.

    I still strongly recommend using an asset loader/minify plugin, which will tackle all your asset output and you can exclude/include items based on the page URL.

    All the best,
    Ernest

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.