Title: Asynchro loading for script
Last modified: August 20, 2016

---

# Asynchro loading for script

 *  [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/)
 * Hello nice plugin !!!
    i wondering do you can make THE improvement : add a box
   like the options but this time one for : make script asynchrone : like : [<script async>](https://developers.google.com/speed/docs/best-practices/rtt#PreferAsyncResources)
 * Thanks a lot it will be the best : Minification + contatenage + asynchro loading
 * [http://wordpress.org/extend/plugins/bwp-minify/](http://wordpress.org/extend/plugins/bwp-minify/)

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

 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584035)
 * That’s an advanced feature and can cause a lot of things to break, but sure I
   will take a look at it when there’s spare time :).
 *  Thread Starter [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584036)
 * yep it will be like an advance option 😉
 * by the way many peoples want to easily change the expiration date of the cache
   so it will be simple to make a box like for indicate how many minutes the cache
   will expire (manual setting)
 * me i change it dirrectly in the config.php
 * and in the same file you can improve the compression level like :
 * // try to disable output_compression (may not have an effect)
    ini_set(‘zlib.
   output_compression’, ‘**8**‘);
 * 😉
 *  Thread Starter [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584037)
 * and an other thing, it is normal that some script put in the box (put script 
   in footer) still are in the header.. ? do you have an idea to force them ? or
   what is blocking them ?
 * thanks a lot !
 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584038)
 * Currently you have to use script handles, not script filename. So instead of 
   jquery.js you will probably have to put in something like ‘jquery’. To look for
   script handles you can check a plugin’s codes.
 *  Thread Starter [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584039)
 * ^^thanks i know that the thing is it work for :
 * superfish
    useronline jqueryc00kie quickchatload jqueryprettyPhoto topbutton 
   custom jqueryjplayermin jqueryuicoremin jqueryuiwidgetmin jqueryuitabsmin comment-
   reply
 * But not for :
    js (js.js of the plugin kk star rating) jqueryeasingmin (jquery.
   easing.min.js) nivosliderpack (nivo.slider.pack.js) mousewheel (mousewheel.js)
   jquerygridnav (jquery.gridnav.js)
 * Do you have an idea of why ?
 *  Thread Starter [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584040)
 * mmm.. if the script are in base 64 ?
 * i will reconvert in normal js the script and test it
 *  Thread Starter [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584041)
 * Nop it change nothing.. damn i dont understand why some scrip dont want to move
   in the footer.. :p
 *  Thread Starter [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584043)
 * it’s because some script have a part print dirrectly in the head with
 * add_action(‘wp_head’,
    or add_action(‘wp_enqueue_scripts’,
 * so i change to : add_action(‘wp_footer’
 * i look if there is no break
 * then i put the handles in the option box and MAGIC it work !
 *  Thread Starter [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584047)
 * One more thing how can y make a combo like isolated minification + put in footer..
 * because it does not work when i put the same handles in the 2 box option.
 *  [jaimecapra](https://wordpress.org/support/users/jaimecapra/)
 * (@jaimecapra)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584177)
 * I made a hack to add async to all of the HTML script insertions. Note that this
   will add async to ALL of them, which may break your page.
    - Deactivate Better WP Minify Plugin. Otherwise the file may be flagged as “
      inactive” and the update will not take effect.
    - Find file `class-bwp-minify.php` in the editor
    - Find function `function get_minify_tag($string, $type, $media = '')`
    - Find line `$return = "<script type='text/javascript' src='" . $this->get_minify_src(
      $string) . "'></script>\n";`
    - Add “async” to that line: `$return = "<script async type='text/javascript'
      src='" . $this->get_minify_src($string) . "'></script>\n";`
    - Reactivate the plugin.
    - Make sure your site didn’t break.
 *  Thread Starter [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * (@jibsoux)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584178)
 * thanks a lot 😉 but a have made a custom version of the plugin that include the
   deferring of the minify script 😉
 * and y have add a setting to exclude a script of the deferring function 😉
 * and updated the library to by the way the plugin creator is working on a new 
   version that include the deferring capabilitie
 * [http://wordpress.org/support/topic/working-version-for-wp36x-update-minify-library-to-217-and-deferred-beta](http://wordpress.org/support/topic/working-version-for-wp36x-update-minify-library-to-217-and-deferred-beta)

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

The topic ‘Asynchro loading for script’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bwp-minify.svg)
 * [Better WordPress Minify](https://wordpress.org/plugins/bwp-minify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bwp-minify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bwp-minify/)
 * [Active Topics](https://wordpress.org/support/plugin/bwp-minify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bwp-minify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bwp-minify/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [JibsouX](https://wordpress.org/support/users/jibsoux/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/asynchro-loading-for-script/#post-3584178)
 * Status: not a support question