Title: Feature request &#8211; async &amp; defer
Last modified: September 24, 2016

---

# Feature request – async & defer

 *  [John McCarthy](https://wordpress.org/support/users/john-lion/)
 * (@john-lion)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/feature-request-async-defer/)
 * Hi there,
 * it’s great to see the plugin emergem and so far, testing is going really well.
 * I’ve been developing a workflow for dealing with page load for a while and have
   used the WP filter `script_loader_tag` to add “defer” & “async” attributes to
   scripts where necessary.
 * Where I’m able to advise on themes or plugins this usually is enough but when
   installations get out of hand and some brute force minification is required your
   plugin is perfect.
 * I’m still working out the best way to approach these situations but do you think
   that adding the ability to add these attributes via the plugin is a viable option?
 * I understand this may create too much complexity from a code perspective and 
   more so the user but I thought I’d run it by you to see if you what you think.
 * All the best, and thanks for sharing your work!
 * John

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

 *  Thread Starter [John McCarthy](https://wordpress.org/support/users/john-lion/)
 * (@john-lion)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/feature-request-async-defer/#post-8217487)
 * To add to this request…
 * Didn’t want post this here as it’s more of a support question than feature request
   but does follow on from this post 🙂
 * [accessing-scripts-loaded-by-the-plugin](https://wordpress.org/support/topic/accessing-scripts-loaded-by-the-plugin/)
 *  Plugin Author [launchinteractive](https://wordpress.org/support/users/launchinteractive/)
 * (@launchinteractive)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/feature-request-async-defer/#post-8220042)
 * Hi John,
 * We could certainly add defer and async support but I wanted to confirm how you
   would prefer this to work. MMR is designed to merge scripts all into one file..
   with that in mind, would you want to defer the lot or only some files?
 *  Thread Starter [John McCarthy](https://wordpress.org/support/users/john-lion/)
 * (@john-lion)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/feature-request-async-defer/#post-8220680)
 * Hey, thanks for getting back to me on this.
 * Per file would be great.
 * Here’s how I thought it could work; Having the ability to select files to be 
   added to three concatenated groups; default, defer and async. Minification can
   also be turned on/off for each group.
 * With these settings I think we’ve covered most cases 🙂 But at the same time 
   having to select those files could make the interface messy so, perhaps this 
   isn’t a good idea?
 *  [Andrew Miguelez](https://wordpress.org/support/users/andrewmiguelez/)
 * (@andrewmiguelez)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/feature-request-async-defer/#post-8401524)
 * Personally, I’d prefer if MMR simply followed the applied defer & async attributes
   by way of `script_loader_tag`. This, instead of a UI change, would mean the plugin
   could maintain its simplicity.
 * I can see how configuration in the plugin settings would be helpful, however 
   I’d argue that since we’re not adding stylesheets/scripts in the plugin, but 
   through **functions.php**, we should manage the attributes in the same way. This
   way, the desired behavior for those files is constant whether the plugin is in
   use or not.
    -  This reply was modified 9 years, 6 months ago by [Andrew Miguelez](https://wordpress.org/support/users/andrewmiguelez/).
      Reason: added tags

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

The topic ‘Feature request – async & defer’ is closed to new replies.

 * ![](https://ps.w.org/merge-minify-refresh/assets/icon.svg?rev=3414776)
 * [Merge + Minify + Refresh](https://wordpress.org/plugins/merge-minify-refresh/)
 * [Support Threads](https://wordpress.org/support/plugin/merge-minify-refresh/)
 * [Active Topics](https://wordpress.org/support/plugin/merge-minify-refresh/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/merge-minify-refresh/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/merge-minify-refresh/reviews/)

## Tags

 * [async](https://wordpress.org/support/topic-tag/async/)
 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [defer](https://wordpress.org/support/topic-tag/defer/)
 * [HTTP](https://wordpress.org/support/topic-tag/http/)
 * [page load](https://wordpress.org/support/topic-tag/page-load/)

 * 4 replies
 * 3 participants
 * Last reply from: [Andrew Miguelez](https://wordpress.org/support/users/andrewmiguelez/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/feature-request-async-defer/#post-8401524)
 * Status: not a support question