Title: Defer Javascript
Last modified: January 15, 2019

---

# Defer Javascript

 *  Resolved [emilbroll](https://wordpress.org/support/users/emilbroll/)
 * (@emilbroll)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/defer-javascript-4/)
 * Hey!
 * We’ve occasionally seen response times for the uc.js-script at more than 5s, 
   and with only the async-attribute set in the script tag, this blocks rendering.
   
   Could you consider adding the defer-attribute to the script, so it won’t block
   parsing?
 * Thanks!

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

 *  Plugin Author [cookiebot](https://wordpress.org/support/users/cookiebot/)
 * (@cookiebot)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/defer-javascript-4/#post-11092949)
 * Hi [@emilbroll](https://wordpress.org/support/users/emilbroll/)
 * Thanks for reaching out!
 * defer will be added as as an option in the plugin on next release.
 * We’ll update you here once it’s released.
 *  Plugin Contributor [Johan Holst Nielsen](https://wordpress.org/support/users/phpgeekdk/)
 * (@phpgeekdk)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/defer-javascript-4/#post-11101725)
 * Hi [@emilbroll](https://wordpress.org/support/users/emilbroll/)
 * We have included the requested feature in the version released few minutes ago(
   version 2.1.5).
 * You are now able to choose none, defer or async as attribute the cookie declaration
   tag as well as the cookie consent banner tag.
 *  Thread Starter [emilbroll](https://wordpress.org/support/users/emilbroll/)
 * (@emilbroll)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/defer-javascript-4/#post-11104295)
 * Fantastic, thanks a lot for the fast action! 🙂
 *  Thread Starter [emilbroll](https://wordpress.org/support/users/emilbroll/)
 * (@emilbroll)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/defer-javascript-4/#post-11156888)
 * Hey! A follow-up from me – it would be great to be able to add both the async
   and defer-attributes at the same time (or neither) – is this possible to implement?
 *  Plugin Contributor [Johan Holst Nielsen](https://wordpress.org/support/users/phpgeekdk/)
 * (@phpgeekdk)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/defer-javascript-4/#post-11158701)
 * Hi [@emilbroll](https://wordpress.org/support/users/emilbroll/)
 * We didn’t include the option to choose both defer and async to keep it a bit 
   more simple for non-technical users.
 * The situations where both async and defer works are pretty rare. By default browsers
   will use async if both async and defer are specified – the only time defer comes
   into effect will be on pretty old browsers that nor supports async ([https://www.w3.org/TR/2011/WD-html5-20110525/scripting-1.html#attr-script-async](https://www.w3.org/TR/2011/WD-html5-20110525/scripting-1.html#attr-script-async)).
   All major (and even minor) browsers support async nowadays. The only browser 
   I am aware of not supporting async is Opera Mini – and it does not support defer
   as well 🙂 ([https://caniuse.com/#feat=script-async](https://caniuse.com/#feat=script-async))
 * There should also be a setting for none. So that part should be covered 🙂
 * Let me know if you have further questions.
 *  Thread Starter [emilbroll](https://wordpress.org/support/users/emilbroll/)
 * (@emilbroll)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/defer-javascript-4/#post-11160935)
 * I see! Thanks for that, I didn’t know 🙂

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

The topic ‘Defer Javascript’ is closed to new replies.

 * ![](https://ps.w.org/cookiebot/assets/icon.svg?rev=3200631)
 * [Cookiebot by Usercentrics - Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode](https://wordpress.org/plugins/cookiebot/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookiebot/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookiebot/)
 * [Active Topics](https://wordpress.org/support/plugin/cookiebot/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookiebot/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookiebot/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [emilbroll](https://wordpress.org/support/users/emilbroll/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/defer-javascript-4/#post-11160935)
 * Status: resolved