• hoakinn25

    (@hoakinn25)


    Hello.

    After the next theme update i discovered that astra began to load resources for woocommrce on all site pages.

    /plugins/astra-addon/addons/woocommerce/assets/js/minified/single-product-ajax-cart.min.js
    /themes/astra/assets/css/minified/compatibility/woocommerce/woocommerce-layout.min.css
    /themes/astra/assets/css/minified/compatibility/woocommerce/woocommerce.min.css
    /themes/astra/assets/css/minified/compatibility/woocommerce/woocommerce-smallscreen.min.css

    Then i noticed my site failed the googles speed test.

    I have a standard function that disables loading woocommerce resources on all pages where there is no woocommerce (from this https://gist.github.com/DevinWalker/7621777#file-woocommerce-optimize-scripts-php).

    And this works both for the main Woocommerce plugin and for other plugins related to woocommerce.

    BUT this does not work for styles and scripts that Astra loads.

    My website has over 50,000 pages. Of these, the woocommerce works on only 100 pages. And it turns out that on 49,950 pages the theme loads scripts that are not needed at all and spoil the speed.

    Is it possible to prevent the theme from loading unnecessary resources where there is definitely no plugin (no cart, products, and generally everything related to the woo)?

Viewing 1 replies (of 1 total)
  • Hi @hoakinn25,

    Please try to rollback Astra to the previous version to see the difference. If the thing you described above is gone, then what you say about the latest update could be right.

    However, if you find the same thing on Astra previous version, then maybe it’s not an issue. You can try temporarily switch the theme to the default WooCommerce theme, Storefront. If you find the same thing is happening on this default theme, we can say this behavior is coming from WooCommerce plugin.

    Kind regards,
    Herman ??

Viewing 1 replies (of 1 total)
  • The topic ‘Load astra’s woo css/js on all site pages and destroys Performance’ is closed to new replies.