[ 15 posts ] Go to page 1, 2 Next

Sarbbottam Bandyopadhyay

  • Username: sarbbottam
  • Joined: Wed Feb 02, 2011 12:58 am
  • Posts: 40
  • Offline
  • Profile
Tags:

yui-min.js

Post Posted: Tue Feb 22, 2011 2:02 am
+0-
Hi all,

I am using only yui-min.js. However I found (@net panel of firebug) that request for loader-min.js and combo request for the below mentioned are made.
3.3.0/build/oop/oop-min.js
3.3.0/build/event-custom/event-custom-base-min.js
3.3.0/build/event/event-base-min.js
3.3.0/build/pluginhost/pluginhost-min.js
3.3.0/build/dom/dom-min.js
3.3.0/build/node/node-min.js
3.3.0/build/event/event-delegate-min.js

There is a bit of latency while getting the response of the above mentioned.

Is there any way to avoid this other than including the complete set of YUI 3.3.0 in my application.

Thanks,
Sarbbottam

Sarbbottam Bandyopadhyay

  • Username: sarbbottam
  • Joined: Wed Feb 02, 2011 12:58 am
  • Posts: 40
  • Offline
  • Profile

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 2:07 am
+0-
My script is as below:
<script language="javascript" src="js/common.js"></script>
<script>
YUI().use('node', function (Y) {

Y.one('#AWMEL0').setStyle('width', '981px');
var show = function() {
Y.all('#AWMEL0 tr td table').setStyle('width', '163px');
Y.all('#AWMEL0 tr td img').setStyle('width', '163px');
var tableLeftOffset = 0;
var tableCounter = 0;
Y.all('#AWMEL0 tr td table').each(function(v){
v.setStyle('left', tableLeftOffset+'px');
v.setStyle('position', 'absolute');
tableCounter += 1;
tableLeftOffset = (Math.floor(tableCounter / 3)) * 163;
Y.log(tableLeftOffset);
});
var imgageleftOffset = 0;
Y.all('#AWMEL0 tr td img').each(function(v){
v.setStyle('left', imgageleftOffset+'px');
v.setStyle('position', 'absolute');
imgageleftOffset += 163;
});
Y.one('#AWMEL0').setStyle('width', '981px');

}

Y.on('domready', show);
Y.on('resize', show, '#AWMEL0');

Y.on('mouseover', function(e){
Y.all('.AWMST5').setStyle('top', '125px');
}, '#AWMEL0');
});
</script>

Note: I have included the content of yui-min.js to my common.js file

Any suggestion?

Donald Fincher

YUI Contributor

  • Username: Floydian
  • Joined: Sat Jan 24, 2009 2:27 pm
  • Posts: 233
  • Location: Ohio
  • GitHub: floydian
  • Gists: floydian
  • IRC: floydian2
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 4:36 am
+0-
Hello Sarbbottam Bandyopadhyay,

If you are looking to have one script tag that will load all of those YUI 3 modules in one go I recommend using the "dependency configurator" to generate a <script> tag that will load only the modules you want to use.
http://developer.yahoo.com/yui/3/configurator/

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 638
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 4:39 am
+0-
There's a video by Ryan called Achieving Performance Zen with YUI 3 in YUI Theater that talks about different loading strategies. You might want to check it out.

Sarbbottam Bandyopadhyay

  • Username: sarbbottam
  • Joined: Wed Feb 02, 2011 12:58 am
  • Posts: 40
  • Offline
  • Profile

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 4:42 am
+0-
Thanks Floydian and Juan.

I will take a look at both of them, My intention is to load all the dependency from application it self not from yahoocdn. I do not want the loader or combo to fetch the dependency module from yahooapis.com

Not sure if it makes any sense.

Donald Fincher

YUI Contributor

  • Username: Floydian
  • Joined: Sat Jan 24, 2009 2:27 pm
  • Posts: 233
  • Location: Ohio
  • GitHub: floydian
  • Gists: floydian
  • IRC: floydian2
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 8:38 am
+0-
Are you looking to have the YUI loader load files from your server, or are you looking to bypass YUI loader entirely and just load files from your server manually?
PHP Horizons | PHP Horizons Blog | Gran Turismo 5 Power

Sarbbottam Bandyopadhyay

  • Username: sarbbottam
  • Joined: Wed Feb 02, 2011 12:58 am
  • Posts: 40
  • Offline
  • Profile

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 9:09 am
+0-
I would like to bypass the loader.

Donald Fincher

YUI Contributor

  • Username: Floydian
  • Joined: Sat Jan 24, 2009 2:27 pm
  • Posts: 233
  • Location: Ohio
  • GitHub: floydian
  • Gists: floydian
  • IRC: floydian2
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 9:14 am
+0-
Then I would recommend combining the YUI scripts that you need into one javascript file and then manually include it using a <script> tag. The YUI instance should pick up on the YUI modules already being loaded, thus bypassing the loader.

Hope that helps.

Sarbbottam Bandyopadhyay

  • Username: sarbbottam
  • Joined: Wed Feb 02, 2011 12:58 am
  • Posts: 40
  • Offline
  • Profile
Tags:

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 9:29 am
+0-
Thanks, YUI Configurator shows <script type="text/javascript" src="http://yui.yahooapis.com/combo?3.3.0/build/yui/yui-min.js&3.3.0/build/oop/oop-min.js&3.3.0/build/dom/dom-base-min.js&3.3.0/build/dom/selector-native-min.js&3.3.0/build/dom/selector-css2-min.js&3.3.0/build/event-custom/event-custom-base-min.js&3.3.0/build/event/event-base-min.js&3.3.0/build/pluginhost/pluginhost-min.js&3.3.0/build/dom/dom-style-min.js&3.3.0/build/dom/dom-style-ie-min.js&3.3.0/build/dom/dom-screen-min.js&3.3.0/build/node/node-min.js&3.3.0/build/event/event-base-ie-min.js&3.3.0/build/event/event-delegate-min.js"></script>, is there any way I can download the composite js file from yahoo???

Donald Fincher

YUI Contributor

  • Username: Floydian
  • Joined: Sat Jan 24, 2009 2:27 pm
  • Posts: 233
  • Location: Ohio
  • GitHub: floydian
  • Gists: floydian
  • IRC: floydian2
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: yui-min.js

Post Posted: Tue Feb 22, 2011 9:34 am
+0-
Absolutely, just paste that url into your browser, and from the file menu click "save page as" or something to that effect. Or just copy the text off the page.

Cheers

-> http://yui.yahooapis.com/combo?3.3.0/bu ... ate-min.js
  [ 15 posts ] Go to page 1, 2 Next
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum