Title: What does &#8220;Optimize JavaScript Code?&#8221; do?
Last modified: September 17, 2022

---

# What does “Optimize JavaScript Code?” do?

 *  Resolved [dago](https://wordpress.org/support/users/debesyla/)
 * (@debesyla)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wtf-does-optimize-javascript-code-do/)
 * Hi, I am very confused. Usually caching and minimizing, defering, etc. plugins
   break websites, but Autoptimize somehow fixed it..? 🙂
 * Basically there is a website, it has Autoptimize + only setting on is “Optimize
   JavaScript Code?”. **What does this setting do?**
 * I am trying to figure out what did it do to website .js files so that those magically
   started to work. Caching doesn’t seem like what’s happening. Is Autoptimize somehow
   changing .js load order? Minifying everything? Something else? I can’t see anything
   obvious in browser Inspect window. Could you maybe direct me to a plugin file
   that is responsible for this setting so I could just poke around and figure out
   it? 😀

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wtf-does-optimize-javascript-code-do/#post-16018660)
 * if the only setting is “optimize js code” and not any of the sub-option, the 
   only thing that is done is minfiying unminified JS (based on filename).
 * hope this clarifies,
    frank
 *  Thread Starter [dago](https://wordpress.org/support/users/debesyla/)
 * (@debesyla)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wtf-does-optimize-javascript-code-do/#post-16019283)
 * Hmm! So Autoptimize only does this?
 * 1) Finds .js (not .min.js) -> minifies it -> places it back in same place;
    2)
   Ignores inline scripts and doesn’t do anything with those?
 * In past few hours I have tried a dozen of other optimisation plugins (litespeed,
   wprocket, etc…) with various minifying settings, but I can’t figure out what 
   Autoptimize does differently 😀
 * …Did anyone already tell that Autoptimize somehow fixes another plugin (Translatepress)
   bug? Because I guess this would be first time for you to hear that. Autoptimize
   is magical, somehow 🙂
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wtf-does-optimize-javascript-code-do/#post-16019642)
 * if only “optimize JS” is active and none of the sub-options (e.g. “aggregate”“
   don’t aggregate but defer”) then indeed only `.js` files that don’t have `min.`
   in the filename are minified.
 * i have heard about AO “fixing” things once in a while (for different reasons 
   and always depending on what the configuration is), but it’s not that common 
   🙂
 *  Thread Starter [dago](https://wordpress.org/support/users/debesyla/)
 * (@debesyla)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wtf-does-optimize-javascript-code-do/#post-16020144)
 * Thank you very much for your answers! 🙂
 *  Thread Starter [dago](https://wordpress.org/support/users/debesyla/)
 * (@debesyla)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wtf-does-optimize-javascript-code-do/#post-16020145)
 * (Oops, forgot to mark as resolved.)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wtf-does-optimize-javascript-code-do/#post-16020653)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘What does “Optimize JavaScript Code?” do?’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/wtf-does-optimize-javascript-code-do/#post-16020653)
 * Status: resolved