The unused JS is being reported as being Autoptimize’s, but AO merely aggregates all the JS provided by your theme & plugins, so if you (really) want to tackle “remove unused JS” then you should look into your theme & plugins and doublecheck if you need all of those.
You might be able to get some improvement using e.g. “plugin organizer” to only allow plugins to work on specific pages.
hope this clarifies,
frank
This is my web address: https://vromonpiyasi.com
Autoptimize create this self Javascript file Google Pagespeed detect as unused Javascript. How to solve this, please?
https://vromonpiyasi.com/wp-content/cache/autoptimize/js/autoptimize_3a255788c1227a6adb2a73d23b0a4b71.js
Autoptimize just combines your theme & plugins JS sahadatuk21, that file does not contain any JavaScript created/ added by Autoptimize. You will have to review plugins & theme used if you want to improve there.
I used Colormag theme. Would you give me the best Autoptimize settings, please?
There are no “best autoptimize settings” I’m afraid sahadatuk21, it depends on theme, active plugins and theme & plugin configuration really. When testing your site, what (except for “unused JS”) is highlighted as sub-par?
for render-blocking CSS have a look at “inline & defer CSS”, see the AO FAQ for more info.
for the LCP image; try adding it in the HTML or the page like this:
<img src="https://yourdomain/image/path/yourimage.jpg" style="display:none;" />
I tried this but unfortunately, it’s not working… Would you please check this screenshot? I got this error. https://pasteboard.co/JWZwSHD.png
What did you try exactly and on what URL?
OK, but what exactly did you try to do?
Exactly I just want to try to solve the “unused CSS and Javascript” error in Pagespeed. I use Colormag theme and only five more plugins.
well, most unused JS is from … Google Ads π

and for unused CSS;
