Title: Loading scripts when needed and reduce pro script size
Last modified: March 11, 2021

---

# Loading scripts when needed and reduce pro script size

 *  [rsmith4321](https://wordpress.org/support/users/rsmith4321/)
 * (@rsmith4321)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/loading-scripts-when-needed-an-pro-javascript-size/)
 * I had a couple of suggestions. Would it be possible to only load the scripts 
   and styles on pages where there is a gallery instead of every page? Also, I like
   to support the plugin, but I’ve actually switched from the pro version to free,
   even though I own pro, to save loading a 45k js file I wasn’t using. Would it
   be possible to use the pro version without the huge javascript being loaded? 
   Also, why does the plugin load jquery-migrate, is it actually needed?
    -  This topic was modified 5 years, 2 months ago by [rsmith4321](https://wordpress.org/support/users/rsmith4321/).
    -  This topic was modified 5 years, 2 months ago by [rsmith4321](https://wordpress.org/support/users/rsmith4321/).

Viewing 1 replies (of 1 total)

 *  [Thomas](https://wordpress.org/support/users/kywyz/)
 * (@kywyz)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/loading-scripts-when-needed-an-pro-javascript-size/#post-14349446)
 * Hello [@rsmith4321](https://wordpress.org/support/users/rsmith4321/),
 * Sorry for this late reply!
 * Indeed, it would be good for us to load scripts only on pages that requires it.
   I will talk with [@tigroumeow](https://wordpress.org/support/users/tigroumeow/)
   to see how we could do that!
 * As for jquery-migrate I believe that this is loaded by WordPress, just like jQuery.
 * Best regards,
    Thomas

Viewing 1 replies (of 1 total)

The topic ‘Loading scripts when needed and reduce pro script size’ is closed to 
new replies.

 * ![](https://ps.w.org/meow-gallery/assets/icon-256x256.png?rev=2791571)
 * [Meow Gallery](https://wordpress.org/plugins/meow-gallery/)
 * [Support Threads](https://wordpress.org/support/plugin/meow-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/meow-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meow-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meow-gallery/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Thomas](https://wordpress.org/support/users/kywyz/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/loading-scripts-when-needed-an-pro-javascript-size/#post-14349446)
 * Status: not resolved