$cnf) { $options['jsdelivery_idle'][$n] = $cnf[0]; if (isset($cnf[1])) { $options['jsdelivery_idle'][$n] .= ':' . $cnf[1]; } } } ?>

Tip: More information about javascript optimization can be found in this blog by Ilya Grigorik, web performance engineer at Google and author of the O'Reilly book High Performance Browser Networking (free online).
Optimize Javascript Loading

When enabled, Javascript files are loaded asynchronously using an enhanced version of little-loader from Walmart Labs (reference).

Javascript Load Optimization

Warning: It may require some tweaking of the settings to prevent javascript problems.

Script Loader

A stable async script loader that works in old browsers.

This script loader requires the Javascript proxy to be enabled to bypass CORS.

A state of the art script loader for optimal mobile speed, inspired by basket.js (by a Google engineer), a script loading concept in use by Google. With fallback to little-loader for old browsers.

Advantages of the HTML5 script loader

  •   0 javascript file download during navigation
  •   0 javascript file download for returning visitors
  •   abide WordPress dependencies
  •   faster script loading than browser cache, especially on mobile

Position

Select the position where the async loading of Javascript will start.

Ignore List

Scripts to ignore in Javascript delivery optimization. One script per line. The files will be left untouched in the HTML.

Remove List

Scripts to remove from HTML. One script per line. This feature enables to include small plugin related scripts inline.

Force Async

When enabled, all scripts are loaded asynchronously.

Async Force List

Enter (parts of) scripts to force to load async. All other scripts are loaded in sequential blocking order if not specifically configured as async in HTML.

Example:

  1. Script1: non-async [wait...]
  2. Script 2,3,4: async, Script 5: non-async [wait...]
  3. Script 6

Async Disabled List

Enter (parts of) scripts to force to load blocking (non-async).

requestIdleCallback

This feature requires the HTML5 script loader.

This feature only applies to localStorage cached scripts. Our new plugin will enable this option for all scripts.

Enter a list with script_string[:timeout_ms] entries (one per line) to execute scripts in CPU idle time within an optional timeout in milliseconds. This feature enables to prioritize script execution. (more information)

Example: script.js:2000 (script.js should execute when CPU is available or within 2 seconds). Timeout is optional.

Abide Dependencies

When enabled, scripts will be loaded in sequential order abiding the WordPress dependency configuration from wp_enqueue_script().

jQuery Stub

When enabled, a queue captures basic jQuery functionality such as jQuery(function($){ ... }); and $(document).bind('ready') in inline scripts. This feature enables to load jQuery async.

Lazy Load Scripts 

When enabled, the widget module from jQuery Lazy Load XT is loaded to enable lazy loading of inline scripts such as Facebook like and Twitter follow buttons.

This option is compatible with WordPress lazy load plugins that use Lazy Load XT. Those plugins are not required for this feature.

');?>