| Page 1 of 1 | [ 6 posts ] |
|
Hi everyone,
I haven't had the opportunity to work with YUI in a production environment with SSL. So I'm in need of some guidance with regards to where to put the YUI files. Since my project uses SSL, I've read that utilizing yahoo's CDN is not an option for me (http://yuilibrary.com/yui/docs/tutorial ... upport-ssl). So then, we would need to host the files on our server, but I'm uncertain how to do this best. If I download the entire YUI framework (e.g. as a zip file), then it has a lot of content packed in there, including docs, tests and even 3 versions of each module (minified, debug and source). So obviously, it would be a pain to go through each module/directory and grab only the min version of each YUI module. Is there a better solution? Thanks. |
|
I recommend hosting the entire build/ directory on your own server. You can leave out the docs, raw source, and tests. Yes, there are three versions of the JS for each module, but this makes it easier for you to debug problems by setting a `filter` config -- this way you won't need to step through minified code if there's a problem. I doubt the extra files will be an issue (they're not large).
To improve performance, you might want to look into using a combo handler to serve your self-hosted files (just like the combo handler on the YUI CDN). I wrote one for Node.js: https://github.com/rgrove/combohandler Other folks have written combo handlers for a variety of languages. |
|
Thanks Ryan.
I'll go with adding the entire 'build' directory. |
|
Another approach would be to build your own rollout files to be served staticly. That is, to concatenate all the modules that you need, and only those, in one or several sets, to be pulled into your page at specific times (before login, after login, ...).
To this end I've written a rollout builder that simplifies and automize this task: http://www.eaktion.com/yui3rob/. The end result of this is, that you sure need to have the entire library on the machine you build the files on. But on your production server you only need to have the yui seed file and the rollout files you have prebuilt. And you don't need to worry about maintaining a combo server. |
|
@Paolo
Your suggestion gives me an alternative to combo loading. I'm not at the point yet where I'm optimizing the JS file loading, but I will consider the roll out builder when I reach that point. Thanks. |
|
You're welcome.
I've just added a blog post to give space to comments, requests and so on. http://www.eaktion.com/blog/2012/02/29/yui3rob-forum/ |
| Page 1 of 1 | [ 6 posts ] |
| 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 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group