• Resolved dreamzspl

    (@dreamzspl)


    Hi,

    I would like to ask regarding a couple of css / js files that resides in
    1) …/wp-content/cache/asset-cleanup/css/item/woodmart-style-v13a32fa92b10f7cc76071dbd248eb4d9c2a29e36.css

    and

    2) ../wp-content/cache/asset-cleanup/js/body-9c37d46762cede24a5252758eae2631a632be52b.js

    I was doing a pagespeed test and the first one above appeared under “Eliminate render-blocking resources” and “Remove unused CSS”, and the second one above appeared under “Remove unused JavaScript”

    This seemed to me that both the above js and css seems to be ‘unused’ and not needed.

    May I know how can I remove these js / css files, given that they are in the “cache/asset-cleanup/…” folders?

    Thank you!

    • This topic was modified 3 years, 8 months ago by dreamzspl.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @dreamzspl the files that are stored in the caching directory of Asset CleanUp, which by default is /wp-content/cache/asset-cleanup/. Google PageSpeed Insights is reporting anything that is unused and render-blocking, no matter where it resides. If you make a test and append to your URL /?wpacu_no_load which will not trigger any Asset CleanUp functions, you will still notice the same thing, the only difference being that the files are loading from their original location.

    Even though Asset CleanUp minified/altered the CSS/JS file, it’s still render-blocking and contains unused CSS. It just loads from a different location because Asset CleanUp, after it minifies the file, has to store its contents somewhere for faster loading.

    There’s a special post written especially to clarify this here: https://www.assetcleanup.com/docs/can-the-plugin-load-render-blocking-css/

    Please go through it and let me know if still need any assistance!

    Thread Starter dreamzspl

    (@dreamzspl)

    Hi @gabelivan , so you mean that the original CSS / JS files are already render-blocking in the first place? Therefore Asset Cleanup does not interfere in the render-blocking nature of these files?

    Is there a way to use Asset Cleanup to identify the original unused CSS / JS files and unload them?

    And wonder if there is a possibility for Asset Cleanup to have the function to control render-blocking resources in future? ??

    Thank you!

    Plugin Author Gabe Livan

    (@gabelivan)

    so you mean that the original CSS / JS files are already render-blocking in the first place? Therefore Asset Cleanup does not interfere in the render-blocking nature of these files?

    Of course, they are render-blocking in the first place as it would be against the purpose of the plugin to just make them block the rendering of the page and have a lower score in Google PageSpeed Insights. It’s just a matter of the disk location from where they are loaded as Asset CleanUp has to alter them and serve them from a different location. In fact, I’m considering changing the name of the caching directory to something else as too many people think that the plugin is causing all the unused CSS and render-blocking warnings which is non-sense.

    Is there a way to use Asset Cleanup to identify the original unused CSS / JS files and unload them?

    Asset CleanUp can help you unload whole CSS/JS files (which are identified in the “CSS & JS Manager” area), but you have to decide which ones are not needed on certain pages. There are also tools such as Coverage which could help you identify unused CSS. You can read about it here: https://www.assetcleanup.com/docs/how-to-check-if-gutenberg-blocks-css-file-is-needed-or-not/

    And wonder if there is a possibility for Asset Cleanup to have the function to control render-blocking resources in the future?

    To make a JS file render-blocking you have to “defer” it and make a CSS file load in an asynchronous way (non-render blocking), you can have to preload it in an asynchronous way. These features are available in the Pro version of Asset CleanUp. However, if you use a plugin such as WP Rocket you can also remove render-blocking resources. Here’s a post about it here: https://www.assetcleanup.com/docs/eliminate-render-blocking-resources/

    There will be more documentation about these render-blocking resources so that everyone would understand how they work and one of the features that eliminates completely any render-blocking CSS is “Critical CSS” which is under development. I’m looking forward to having it released. It will offer granular control over the pages where it will be activated, like enabling it just for the homepage and a few key pages with the option to edit it so it could be polished as one wishes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘enquiry on CSS / JS file that resides in …/wp-content/cache/asset-cleanup/…’ is closed to new replies.