tags:

views:

7

answers:

1

I'd like to use Google's hosted version of YUI (since Yahoo's doesn't support SSL). I'm using YUILoader:

var loader = new YAHOO.util.YUILoader({
    require: ["autocomplete"],
    onSuccess: function() { ac_ready = true; setup_manager_autocomp() },
    combine: true
});

I'm loading yuiloader from Google's CDN:

<script src="https://ajax.googleapis.com/ajax/libs/yui/2.8.1/build/yuiloader/yuiloader-min.js"&gt;&lt;/script&gt;

But the request YUILoader makes goes to Yahoo instead of googleapis.com . Apparently I need to set "base" and "comboBase", ala:

comboBase: 'http://yui.yahooapis.com/combo?',

except set to googleapis instead of yahooapis.

I can't quite figure out what comboBase should be when using googleapis. Anybody know the magic incantation?

+1  A: 

Parand,

Google's CDN does not support combo-handling (Yahoo's CDN does support this feature). As a result, when loading from Gooogle's CDN you need to set combine:false.

The Dependency Configurator for YUI 2 can help here:

http://developer.yahoo.com/yui/articles/hosting/?autocomplete&amp;MIN&amp;nocombine&amp;basepath&amp;http://ajax.googleapis.com/ajax/libs/yui/2.8.1/build/&amp;google

Click on the "Dynamic Loading with YUI Loader" tab for sample code.

-Eric

Eric Miraglia
Thanks Eric. Would be great if Yahoo's CDN supported https.
Parand