[wp-hackers] Slim WordPress by way of Google Ajax API?

Andrew Ozz admin at laptoptips.ca
Sat May 31 20:35:04 GMT 2008


Eric Marden wrote:
> 
>> So its faster? Hmmm...appealing... :)
> 
> 
> This is more anecdotal than authoritative.
> Numbers. or it didn't happen. ;)

Using this to load the default js libraries in WordPress would probably 
not increase the speed of the admin.

In theory, after the first access all static files, js, css and images, 
are stored in the browser's cache. Next time the page is accessed, these 
files are loaded from the cache. The browser makes requests to the 
server only to check for updated versions.

Since we have Gears now, all these requests are local too. When loading 
an admin page there are only 1-2 requests sent to the server. Using 
Google Ajax API to load js libraries would actually be slightly slower, 
as the library would not be cached in Gears.

On the other hand using the API for loading js on the front pages or in 
a plugin that doesn't use the WordPress defaults would increase the 
speed for the site's visitors and also reduce bandwidth usage.

To do that easily, perhaps we need a function that plugs into 
wp_print_scripts() or similar and would switch to using Google Ajax API 
only on the front end, and could be included/referenced in other plugins 
(needs a hook). Perhaps that could make it in core too.


More information about the wp-hackers mailing list