An easy way to defer loading jQuery in WordPress
Is there any option to fix this? I use Autoptimize and I can fix this by checking one option there but, after that, I have problems on my website, some content missing so this is not the solution. The function has a parameter to have the script loaded in the footer, which in effect defers parsing. Find the enqueue code for the script you want to defer. In your callback, re-enqueue using all the same arguments except pass true as the 5th parameter to have it loaded in the footer. You could simply alter the original enqueue code instead, but then such a change would be lost when the respective module is updated. You could do so as a quick test to see if anything breaks, but overriding with your own code is the proper fix.
The defer attribute is an attempt to fix all the issues mentioned above. A script tag that is loading with defer looks like this:
audioportal.su audioportal.spb.ru all-audio.pro black-job.net management-club.com safe-crypto.me vse-multiki.com ultrasoft.solutions