javascriptwordpressperformancepagespeedgtmetrix

Load JS in autoptimize plugin manually


Autoptimize plugin is not combining all internal javascripts in one URL. It's merging all others rather than 2 JS files. How to merge 1 and 2 js files (as shown in Gtmetrix screenshot) into autoptimize random URL manually? gtmetrix screenshot


Solution

  • Please check these settings under WP Dashboard > Settings > Autoptimize

    enter image description here

    The two files are most likely present in the Excluded scripts field. As pointed out by @cabrerahector in comments to your question, it advisable to leave jQuery out for proper rendering.

    The second script is coming from Lazy Loading of Images.

    enter image description here

    It seems the author has excluded it from combining for a reason known to him. Your best option is to raise a support ticket at https://wordpress.org/support/plugin/autoptimize/ and ask them directly.

    Important thing to note is even though these scripts are loaded separately, there load time is unusually high for a local script. I would check if the hosting is properly optimized first.