[wp-hackers] Adding A CSS Loader

Jamie Holly hovercrafter at earthlink.net
Mon Apr 23 14:15:40 GMT 2007


> 
> This seems like a good proposal.
> 
> I would like to add the same idea for the addition of javascript.
> Although I wonder about the order which might cause issues with
> javascript files (such as with prototype and jquery). I'm not sure if
> the same would apply to css.
> 
> grtz
> BjornW
> 

This would also be a good idea. We could add a load order to the function -
add_js('js file name',load_order), with the higher numbers loading before
the lower numbers.

I think this would all be best in a major version release (ie: 3.0), but
overall it would reduce the calls to the server to load files. If you got 5
plugins loading CSS and JS, that is an additional 10 calls to the server.
Add that to other items, such as theme images, and a page quickly becomes
inflated with requests.

Jamie Holly
http://www.intoxination.net



More information about the wp-hackers mailing list