Skip to content

gnrocks/wordpress-asynchronous-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

=== Asynchronous Javascript ===
Contributors: parisholley
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paris%40holleywoodproductions%2ecom&lc=US&item_name=Paris%20Holley&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
Tags: async,headjs,asynchronous,performance,javascript
Requires at least: 3.5
Tested up to: 3.5
Stable tag: trunk

Improve page load performance by asynchronously loading javascript using head.js

== Description ==

This plugin is meant to be a drop-in to your wordpress installation with no additional configuration. The goals/features of this plugin are:

* Load javascript files in an asynchronous manner to improve time to DomReady/OnLoad
* Use existing wordpress APIs for backwards compatability and prevent coupling to this plugin
* Leverage dependency model wordpress provides for assets to improve loading performance


== Installation ==

1. Upload `asynchronous-javascript` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress

== Frequently Asked Questions ==

= How do I include a script that I do not control but has a dependency on another script? =

In your theme, use the static AsynchronousJS::wp_enqueue_async_script() method, which is API compatible with wp_enqueue_script($handle, $src, $deps). Using this method will cause the $src to load ONLY when scripts with the handles defined in $deps have been loaded.

= Is there any potential problems with other plugins? =

As long as those plugins are using the built-in wordpress script queuing and not attempting to output scripts manually (such as invoking wp_print_scripts()), you should have no problems.

== Changelog ==

= 1.1 =
* Removed `wp_enqueue_async_script()`, should be able to use normal wordpress method `wp_enqueue_script()`
* Updated normal enqueue processing to use dependencies, will need to improve upon this in future.

= 1.0 =
* Initial release, seems to work. :)

== Upgrade Notice ==

= 1.1 =
* Dependencies are now honored and it is recommended that you use this version instead of 1.0
* `wp_enqueue_async_script()` is no longer available for use in the theme

About

Improve page load performance by asynchronously loading javascript and files using head.js in your wordpress website.

Resources

Stars

Watchers

Forks

Packages

No packages published