Title: JS Delay for Inline Script
Last modified: April 9, 2025

---

# JS Delay for Inline Script

 *  Resolved Anonymous User
 * (@anonymized-23173868)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/)
 * I have set the “Load JS Deferred” option to “Deferred”. I have then added some
   strings to the “JS Delayed Includes” option. I have an inline script that looks
   like this.
 *     ```wp-block-code
       <script type='text/javascript'> var url = window.location.origin + '?ob=open-bridge'; fbq('set', 'openbridge', '565019775934206', url); </script>
       ```
   
 * So, in the “JS Delayed Includes” box I have set both “fbq” and “openbridge”. 
   However, the inline script is not being delayed. It is being deferred and the
   inline stuff is base64 encoded. How do I get this to work properly?

Viewing 11 replies - 16 through 26 (of 26 total)

[←](https://wordpress.org/support/topic/js-delay-for-inline-script/?output_format=md)
[1](https://wordpress.org/support/topic/js-delay-for-inline-script/?output_format=md)
2

 *  Thread Starter Anonymous User
 * (@anonymized-23173868)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/2/#post-18412519)
 * That makes zero sense though and is wrong. When I set “Load JS Deferred” and 
   select “Delayed” all of my scripts are automatically delayed by default. I don’t
   have to put them in the “JS Delayed Includes” setting. They are automatically
   delayed. The “JS Delayed Includes” field is so that you can specify individual
   scripts which will always be delayed, regardless of the “Load JS Deferred” setting.
   As I said, if I set “Load JS Deferred” to “Deferred” and then add a linked script
   in the “JS Delayed Includes” setting, it works. It only does not work for inline
   JS.
 * I’m not trying to be snarky here, but it doesn’t seem like you understand how
   the plugin works.
    -  This reply was modified 1 year, 1 month ago by Anonymous User.
    -  This reply was modified 1 year, 1 month ago by Anonymous User.
 *  Thread Starter Anonymous User
 * (@anonymized-23173868)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/2/#post-18420668)
 * Haven’t gotten a reply so not sure if anybody is looking at this. But here’s 
   a video showing the issue and how to fix it.
 * Edit: A better video
 * [https://share.cleanshot.com/qcCP9zfq](https://share.cleanshot.com/qcCP9zfq)
    -  This reply was modified 1 year, 1 month ago by Anonymous User.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/2/#post-18421084)
 * @thekendog 
   LSC is working in 1 mode only. You choose which mode is that, from
   [https://docs.litespeedtech.com/lscache/lscwp/pageopt/#load-js-deferred](https://docs.litespeedtech.com/lscache/lscwp/pageopt/#load-js-deferred)
   Based on the setting done the correct setting will be loaded.I understand that
   you want all scripts deferred and SOME deferred: but the include/exclude are 
   loaded based on the **Load JS Deferred**.We have no plans(at least now) to change
   how it works.I hope I am clear now.
 *  Thread Starter Anonymous User
 * (@anonymized-23173868)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/2/#post-18421899)
 * [@litetim](https://wordpress.org/support/users/litetim/) your response is a little
   confusing. What does this mean?
 * _I understand that you want all scripts deferred and SOME deferred: but the include/
   exclude are loaded based on the **Load JS Deferred**._
 * You said deferred twice. Did you mean delayed?
 * Did you watch my video? Based on your response it doesn’t seem like you did. 
   Is there another support person who can take a look at this? I don’t understand
   what isn’t clear about the bug I’m seeing.
    1. I set JS to be deferred
    2. I add a linked script to the delayed include section. It gets properly delayed.
    3. I add an inline script to the delayed include section. It does not get properly
       delayed.
    4. I showed you the bug in the plugin and how to fix it. When I implement it, things
       work properly.
 * If some other support person can take a look at this and watch my video it would
   be greatly appreciated. I ended up having to buy Perfmatters because LS Cache
   doesn’t work properly.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/2/#post-18422039)
 * @thekendog per your request I will tag my other colleague: [@qtwrk](https://wordpress.org/support/users/qtwrk/)
   
   🙂And you are right. I was wrong when I wrote _deferred and SOME deferred_ 🙂
    -  This reply was modified 1 year, 1 month ago by [litetim](https://wordpress.org/support/users/litetim/).
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/2/#post-18422366)
 * okay , please forgive my bluntness , if I am reading the whole thing correctly
 * in the case : when `Load JS Deferred` set to `Deferred` , and you put something
   in the `JS Delayed Includes`
 * expect: both `external JS` and `inline JS` in the `JS Delayed Includes` field
   to be delayed, while rest JS are deferred
 * actual: only `external JS` is delayed , `inline JS` is NOT , which you expect
   it to be delayed as well
 *  Thread Starter Anonymous User
 * (@anonymized-23173868)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/3/#post-18422370)
 * [@qtwrk](https://wordpress.org/support/users/qtwrk/) yes, that is correct.
    -  This reply was modified 1 year, 1 month ago by Anonymous User.
 *  Thread Starter Anonymous User
 * (@anonymized-23173868)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/3/#post-18429469)
 * Any update on this?
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/3/#post-18429480)
 * @thekendog closing this topic as you created a github issue. Your ticket got 
   to developers and is waiting for an answer
 *  Thread Starter Anonymous User
 * (@anonymized-23173868)
 * [1 year ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/3/#post-18498250)
 * [@puregraphx](https://wordpress.org/support/users/puregraphx/) it’s here:
 * [https://github.com/litespeedtech/lscache_wp/issues/831](https://github.com/litespeedtech/lscache_wp/issues/831)
 * Seems like they are ignoring it which is frustrating. It’s an easy fix and the
   current behavior isn’t what you would expect it to be and doesn’t even match 
   up with the instructions in the plugin itself.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/3/#post-18498901)
 * @thekendog we are not ignoring you(we saw your Github messages and you got the
   same answer there). As I said from beginning: current code will not allow that
   to happen.
   Changing this now, will make other sites not work as expected.For 
   now, if anybody want to use your fix feel free to apply the chnages.I will close
   this topic because I consider this as resolved.
 * Thank you 🙂

Viewing 11 replies - 16 through 26 (of 26 total)

[←](https://wordpress.org/support/topic/js-delay-for-inline-script/?output_format=md)
[1](https://wordpress.org/support/topic/js-delay-for-inline-script/?output_format=md)
2

The topic ‘JS Delay for Inline Script’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 36 replies
 * 4 participants
 * Last reply from: [litetim](https://wordpress.org/support/users/litetim/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/js-delay-for-inline-script/page/3/#post-18498901)
 * Status: resolved