Support » Plugin: Autoptimize » Ignore certain inline JavaScript

Viewing 6 replies - 1 through 6 (of 6 total)
  • In checking out autoptimizeScripts.php, I wonder if you could put a filter on loading vars like dontmove so that we can customize our themes to work better with Autoptimize.

    Ah… wait there’s a JavaScript option on things to exclude. Oh, I see how it works now. Guess, what, I’m okay now.

    Michael, could you please explain what you did enter in the admin page in the field “Exclude scripts from autoptimize:” to exclude an inline JS?


    Thank you for this. You just made me figure out how to get Gist includes working on my site. I had forgotten about Autoptimize moving inlines to bottom.

    in “Exclude scripts from autoptimize”, I simple add a comma “,” and then a keyword from the start of the actual JavaScript that I’m working with.

    Check out the source code of and see how the following bits are left alone, “s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client,zenbox.js,Zenbox.init,ClickTale,”.

    Thanks, I got it. Yesterday I tried nearly the same, but it didn’t work. Today I used some variables from the code and it worked.

    Great answer, thank you.

    Plugin Author Frank Goossens


    fyi; I’m pushing a “beta”-version of 1.6.6 out (download here), which has noptimize-support.

    A simple example of JS being excluded;
    <!--noptimize--><script>alert('this will not get autoptimized');</script><!--/noptimize-->

    Looking forward to your feedback!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ignore certain inline JavaScript’ is closed to new replies.