Title: Control loading order
Last modified: May 4, 2026

---

# Control loading order

 *  Resolved [joy0114](https://wordpress.org/support/users/joy0114/)
 * (@joy0114)
 * [1 day, 10 hours ago](https://wordpress.org/support/topic/control-loading-order/)
 * Hi,
 * Is there a way to control the loading order of JS files that are deferred by 
   LSCWP ?
 * I have JS files that are enqueued via functions.php (1), and I have JS files 
   that are loaded via a plugin (2).
 * I would like all of them to be deferred, but I also want (1) to load BEFORE (
   2).
 * Is it possible to control this?
 * Thank you.
 * Best regards

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

 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [21 hours, 35 minutes ago](https://wordpress.org/support/topic/control-loading-order/#post-18899304)
 * [@joy0114](https://wordpress.org/support/users/joy0114/) 
   Add the file name to
   [https://docs.litespeedtech.com/lscache/lscwp/pageopt/#js-deferreddelayed-excludes](https://docs.litespeedtech.com/lscache/lscwp/pageopt/#js-deferreddelayed-excludes)
   You tried to change the priority of filter/action when is loaded? If you can 
   control code from **functions.php** change there.
 *  Thread Starter [joy0114](https://wordpress.org/support/users/joy0114/)
 * (@joy0114)
 * [15 hours, 23 minutes ago](https://wordpress.org/support/topic/control-loading-order/#post-18899792)
 * Hi litetim,
 * Okay, thanks for the advice.
 * I followed it, and by adjusting the priorities in function.php and the plugin
   loading order, I was able to achieve the desired result.
 * Thanks again !
 * Best regards
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [10 hours, 58 minutes ago](https://wordpress.org/support/topic/control-loading-order/#post-18900014)
 * [@joy0114](https://wordpress.org/support/users/joy0114/) perfect!
   Glad I could
   help you.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcontrol-loading-order%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](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/)

 * 3 replies
 * 2 participants
 * Last reply from: [litetim](https://wordpress.org/support/users/litetim/)
 * Last activity: [10 hours, 58 minutes ago](https://wordpress.org/support/topic/control-loading-order/#post-18900014)
 * Status: resolved