[ 6 posts ]

Daniel Ji

  • Username: humblepie
  • Joined: Tue Feb 28, 2012 10:30 am
  • Posts: 147
  • GitHub: humblepie
  • Gists: humblepie
  • Offline
  • Profile

serving YUI files on SSL

Post Posted: Tue Feb 28, 2012 2:00 pm
+0-
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.

Ryan Grove

YUI Developer

  • Username: rgrove
  • Joined: Tue Dec 09, 2008 9:55 pm
  • Posts: 275
  • Location: Portland, OR
  • Twitter: yaypie
  • GitHub: rgrove
  • Gists: rgrove
  • IRC: rgrove
  • YUI Developer
  • Offline
  • Profile

Re: serving YUI files on SSL

Post Posted: Tue Feb 28, 2012 4:59 pm
+0-
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.

Daniel Ji

  • Username: humblepie
  • Joined: Tue Feb 28, 2012 10:30 am
  • Posts: 147
  • GitHub: humblepie
  • Gists: humblepie
  • Offline
  • Profile

Re: serving YUI files on SSL

Post Posted: Tue Feb 28, 2012 5:10 pm
+0-
Thanks Ryan.

I'll go with adding the entire 'build' directory.

paolo nesti poggi

YUI Contributor

  • Username: paolo
  • Joined: Sat Mar 14, 2009 9:53 am
  • Posts: 77
  • Location: Roskilde DK
  • GitHub: tribis
  • Gists: tribis
  • Offline
  • Profile
Tags:

Re: serving YUI files on SSL

Post Posted: Wed Feb 29, 2012 3:31 am
+0-
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.

Daniel Ji

  • Username: humblepie
  • Joined: Tue Feb 28, 2012 10:30 am
  • Posts: 147
  • GitHub: humblepie
  • Gists: humblepie
  • Offline
  • Profile

Re: serving YUI files on SSL

Post Posted: Wed Feb 29, 2012 10:25 am
+0-
@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.

paolo nesti poggi

YUI Contributor

  • Username: paolo
  • Joined: Sat Mar 14, 2009 9:53 am
  • Posts: 77
  • Location: Roskilde DK
  • GitHub: tribis
  • Gists: tribis
  • Offline
  • Profile

Re: serving YUI files on SSL

Post Posted: Wed Feb 29, 2012 4:25 pm
+0-
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/
  [ 6 posts ]
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