The MU forums have moved to

Google AJAX Libraries API Plugin (3 posts)

  1. cafespain
    Posted 14 years ago #

    Hi all
    As Google have announced that they intend to host Javascript libraries for each of the major libraries I thought I would throw together a quick plugin that will automatically switch your WordPress site from using locally hosted javascript libraries to using those hosted by Google.

    Activating the plugin will switch your site to use the Google libraries, de-activating will switch it back to the default.

    It will only switch scripts loaded with wp_enqueue_script.

    The plugin is available here:

    To enable the plugin for your entire site simply put it in the MU-plugins directory instead of the standard plugins directory.

  2. andrewbillits
    Posted 14 years ago #

    Have you noticed any improvements in loading times by doing this?


  3. cafespain
    Posted 14 years ago #

    For me (as a non standard user), it seems quicker.

    It certainly seems quicker (though I have no metrics as yet) if I go to multiple blogs on my own server.

    Rather than loading:
    and then

    The caching seems to come into play as it's loading jquery from a single source now. Though I suppose if you held all your static files on a single separate domain then you would get a similar effect.

    I suppose the main benefit of the caching will be achieved if / when more sites start using the Google hosted libraries.

About this Topic

  • Started 14 years ago by cafespain
  • Latest reply from cafespain