Title: Aggregate inline JS &#8211; not catch up all inline scripts
Last modified: August 31, 2016

---

# Aggregate inline JS – not catch up all inline scripts

 *  Resolved [bffnb](https://wordpress.org/support/users/bffnb/)
 * (@bffnb)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/aggregate-inline-js-not-catch-up-all-inline-scripts/)
 * Hi Frank,
 * the “Also aggregate inline JS” does not catch up all inline Scripts. I tried 
   all setting variations – no luck. Any Idea how to fix this? i have 12 inline 
   scripts.
 * Thank you so much
 * [https://wordpress.org/plugins/autoptimize/](https://wordpress.org/plugins/autoptimize/)

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

 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/aggregate-inline-js-not-catch-up-all-inline-scripts/#post-7312118)
 * > the “Also aggregate inline JS” does not catch up all inline Scripts.
 * this might well be intentional;
    1. AO by and of itself excludes specific strings
   from optimization to avoid issues (e.g. excluding “nonce” to avoid nonce’s busting
   the cache or excluding Google Analytics and WordPress stats to avoid them breaking)
   2. plugins can themselves ensure they’re excluded (using the AO API).
 * hope this clarifies,
    frank
 *  Thread Starter [bffnb](https://wordpress.org/support/users/bffnb/)
 * (@bffnb)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/aggregate-inline-js-not-catch-up-all-inline-scripts/#post-7312181)
 * Hi,
 * the following code is kind of the one that are not catched:
 *     ```
       <script>var block_td_uid_2_571bf6cb049bb = new tdBlock();
       block_td_uid_2_571bf6cb049bb.id = "td_uid_2_571bf6cb049bb";
       block_td_uid_2_571bf6cb049bb.atts = '{"..."}';
       block_td_uid_2_571bf6cb049bb.td_column_number = "1";
       block_td_uid_2_571bf6cb049bb.block_type = "td_block_2";
       block_td_uid_2_571bf6cb049bb.post_count = "6";
       block_td_uid_2_571bf6cb049bb.found_posts = "29";
       block_td_uid_2_571bf6cb049bb.header_color = "";
       block_td_uid_2_571bf6cb049bb.ajax_pagination_infinite_stop = "";
       block_td_uid_2_571bf6cb049bb.max_num_pages = "5";
       tdBlocksArray.push(block_td_uid_2_571bf6cb049bb);
       </script>
       ```
   
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/aggregate-inline-js-not-catch-up-all-inline-scripts/#post-7312234)
 * given the randomness of the uid, I think it’s a good idea not to aggregate that(
   as it would bust the JS cache).
 * frank
 *  Thread Starter [bffnb](https://wordpress.org/support/users/bffnb/)
 * (@bffnb)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/aggregate-inline-js-not-catch-up-all-inline-scripts/#post-7312235)
 * I understand, but it would be awesome if there is way to cache also scripts with
   random numbers and remove them afterwads from the cache if a new script is generated–
   but i think thats not possible with the random uid number…
 * if there is no way – you can close this topic.
    Thank you so much best
 *  Plugin Author [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * (@futtta)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/aggregate-inline-js-not-catch-up-all-inline-scripts/#post-7312242)
 * that would prove too complex difficult, not in the least because ideally your
   autoptimized JS is used by multiple pages, where the uid will likely always be
   different. so removing an autoptimized JS from cache because the UID changed 
   could effectively removed JS with UID still in use on another page 🙂
 * frank

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

The topic ‘Aggregate inline JS – not catch up all inline scripts’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Frank Goossens](https://wordpress.org/support/users/futtta/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/aggregate-inline-js-not-catch-up-all-inline-scripts/#post-7312242)
 * Status: resolved