Support » Plugin: Autoptimize » Too Many JS/Dist Files Loading on Front-End

  • Resolved albie2011

    (@albie2011)


    If you look at at GtMetrix run of the website homepage at InhouseBlog.com we are loading 25+ elements from the js/dist folder to the front-end. This did not used to happen and we used to have 30 elements or less total for a page load (now at 60+).

    https://gtmetrix.com/reports/www.inhouseblog.com/BG5KGBqk

    You can see the elements here.

    https://share.getcloudapp.com/L1uQE7j7

    Are these JS needed? We’ve tried to tweak Autoptimize to stop them loading but cannot and are not sure why they are loading. They don’t load on other sites we have.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    you can remove wp-includes/js/dist/ from the JS optimization exclusions to see if you can have them aggregated without breaking things, but the root problem is a plugin (or your theme) using types of WordPress blocks on the frontend which require (a lot) of JS to function. the only solution there is not to use such blocks really …

    Thread Starter albie2011

    (@albie2011)

    Thank you @optimizingmatters – is there a tool that can help us detect what is loading these? We’ve tried turning off likely plugin culprits but that didn’t help. We didn’t have this issue a few months ago – we think something updated (WP or plugin) that is now making these calls. It would be great to have a tool to see what is making these things load as our other sites don’t have this issue. We even tried the Disable Gutenberg plugin but that didn’t help.

    • This reply was modified 1 year, 2 months ago by albie2011.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I don’t know of a tool that does that no, but you might be able to find interesting info with some code, e.g.;

    
    add_action('wp', function(){global $wp_scripts; var_dump($wp_scripts);});
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Too Many JS/Dist Files Loading on Front-End’ is closed to new replies.