Title: Not optimizing/deferring
Last modified: May 29, 2023

---

# Not optimizing/deferring

 *  Resolved [sunofjuche](https://wordpress.org/support/users/sunofjuche/)
 * (@sunofjuche)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/not-optimizing-deferring/)
 * Hello, I’m facing a problem when scripts on my page aren’t being optimized and
   deferred by Autoptimize, which happens only when I’m logged in as admin. This
   causes errors in scripts and prevents them from working at all with error logs
   shown below
 * ![](https://i0.wp.com/i.imgur.com/F3JnixX.png?ssl=1)
 * So, this is clear that Autoptimize’s cached JS isn’t being load when admin
 * ![](https://i0.wp.com/i.imgur.com/7wvWQmd.png?resize=169%2C246&ssl=1)
 * And when guset, everything works fine
 * ![](https://i0.wp.com/i.imgur.com/unNPK1x.png?resize=167%2C221&ssl=1)
 * Here’s my plugin options
 * ![](https://i0.wp.com/i.imgur.com/Y6RXQVj.png?ssl=1)
 * ![](https://i0.wp.com/i.imgur.com/8vrMNn2.png?ssl=1)
 * As you can see, I have “Also optimize for logged in editors/ administrators?”
   on, but it still seems to make no difference (I’ve tried disabling and re-enabling
   it). I’m not sure how I can address this problem, could you please help me?

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/not-optimizing-deferring/#post-16777691)
 * so CSS optimization works for both anonymous & logged in admins, but JS opt. 
   does not?
 * the only thing I can think of is that a plugin (or your theme) is using AO’s 
   API to instruct it not to optimize maybe? to test you could try disabling (and
   re-enabling) plugins one at a time and/ or switching themes briefly to try to
   find a possible culprit?
 * hope this helps,
    frank
 *  Thread Starter [sunofjuche](https://wordpress.org/support/users/sunofjuche/)
 * (@sunofjuche)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/not-optimizing-deferring/#post-16779196)
 * Yeah, it seems Elementor plugin was causing this issue. I just wanted to confirm
   I’m not mixing things up. Thanks, and sorry for bothering!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/not-optimizing-deferring/#post-16779205)
 * no worries, happy you found the culprit 😉

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

The topic ‘Not optimizing/deferring’ 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/)

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/not-optimizing-deferring/#post-16779205)
 * Status: resolved