PDA

View Full Version : Dark Matter FREE template: utilities.js in image_template.html


IndoorJo
01-29-2009, 05:29 PM
Hi!

I have a question about the utilities.js enbedded in image_template.html:

<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/utilities/utilities.js"></script>

Why is this file referenced to that URL and not referenced to the own file system (webspace)? In case of an failure on yui.yahooapis.com this script wouldn't work and as a result of this my website has an failure, too.

Thx for answering.

jaywilliams
01-30-2009, 03:49 PM
What Are the Benefits of Having Yahoo! Host YUI Files?

Yahoo!’s network is located throughout the world. HTTP requests for YUI files are evaluated to determine their geographic source and then served from in-region server farms wherever possible. This edge-computing system provides shorter round-trip times for packets as compared to the use of centralized network hosts. Because YUI files (consisting of JavaScript files, CSS files, and image resources) are static, there need be no relationship between the server providing these files and the server holding session information and business logic for a given application. Moving these files off a central server and closer to your users, therefore, should make your application more responsive overall.


Read Yahoo's full reason here: http://yuiblog.com/blog/2007/02/22/free-yui-hosting

Of course, you can host them yourself, if you wish too.

IndoorJo
01-30-2009, 04:53 PM
Hi Jay,

ah okay, I understand...

As I read on developer.yahoo.com, there is a new version of the utilities.js: yui.yahooapis.com/2.6.0/build/utilities/utilities.js - Is it useful to use this version or is it better to let it as it is?

Thx,
Jochen

jaywilliams
01-30-2009, 05:01 PM
As the old saying goes: "If it ain't broke, don't fix it."

But if you want, you could try using the new version, you could always revert back if you find that it broke something.

IndoorJo
01-30-2009, 05:05 PM
Hi Jay,

okay, but I'm not familar with this js-file and I don't know in detail, what it does and what not. So I think it's better to let it as it is... :-P