The unfolding search bar stopped working on my site.
Changing Autoptimize setting “Force JavaScript in <head>?” (Load JavaScript early) to unchecked made it work again.
Update: Pls ignore my post.. Didn’t make notice of “Force JavaScript in <head>” setting in your original post. Will go get a cup of coffee and come back π
Hi,
I use Autoptimize and don’t face this problem. Can you list the JavaScript optimization setting you’re using?
Here are my settings.
Optimize JavaScript Code – Enabled (of course π
Force JavaScript in <head> – Disabled
Also aggregate inline JS? – Disabled
Exclude scripts from Autoptimize- (Default settings)
Add try-catch wrapping? – Disabled
I followed Tom’s settings advised on https://generatepress.com/fastest-wordpress-theme/ but as mentioned unckecked forced header to get the search bar to work.
(thus, if other see the problem, Tom may want to update his suggested settings)
Tried adding jquery.js to “Exclude scripts” list. Checking the forced header leads to non-working search bar π
The site is https://coe.qualiware.com
Very strange, but after some thought, forcing JS to the head isn’t a good idea for speed. As the option says, it makes it render blocking all to prevent JS errors.
If there’s no JS errors without forcing it to the head, you’re better off keeping that option unchecked.