autoptimize does not defer inline js with comments
-
as mentioned in the topic : https://ww.wp.xz.cn/support/topic/some-inline-javascript-not-being-deferred/ i have a different cause detected. My inline js is somehow have comments inside. But these comments are html comments like <!– –>. This was my situation, autoptimize replaces the comment <!– bla bla.. –> with some comment code %%COMMENTS531ab… then try to replace the code with deferred base64 but, the str replace inside autoptimizeScripts.php code : $this->content = str_replace( $tag, $new_tag, $this->content ); cannot replace code, as the comment in the code has replaced the comment with %%Comment but it cannot so.
That was my problem. i know we shouldn’t use html comment inside script, but the code is beyond too old.
Maybe you want to fix this situation or not.
The page I need help with: [log in to see the link]
The topic ‘autoptimize does not defer inline js with comments’ is closed to new replies.