什么是“正确”的使用YUI3和HTTPS的方法? [英] What is the "right" way to use YUI3 with HTTPS?

查看:111
本文介绍了什么是“正确”的使用YUI3和HTTPS的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对YUI2有很多经验,而且我正在加快YUI3的速度。我正在编写的服务需要HTTPS,但是香草YUI体验来自雅虎仅支持HTTP的CDN,当Chrome浏览器试图将HTTPS页面与HTTP javascript混合时,它在Chrome中悄然失败并在现代IE中大声失败。

I have a lot of experience with YUI2 and I'm getting up to speed on YUI3. The service I'm writing needs HTTPS, but the vanilla YUI experience loads from Yahoo's HTTP-only CDN, which quietly fails in Chrome and loudly fails in modern IE when the browser tries to mix an HTTPS page with HTTP javascript.

我的目标是获得全部:


  1. 网站使用HTTPS

  2. YUI适用于Chrome& IE(所以脚本也必须通过SSL提供)

  3. 使用现代版本的YUI 3(这取消了 YUI PHP Loader 尚未更新以支持甚至YUI 3.4,而3.8是当前)

  4. 使用汇总组合来代替许多JS和CSS文件(这取消了谷歌的CDN ...如果YUI 3实际上是我在那里托管的,我找不到。)

  5. 站点动态加载YUI依赖项(依赖项定期更改为I添加功能,返回配置器并每次保存新捆绑包都是PITA)

  1. Site uses HTTPS
  2. YUI works in Chrome & IE (so scripts also must be delivered over SSL)
  3. Uses a modern version of YUI 3 (this disqualifies YUI PHP Loader which hasn't been updated to support even YUI 3.4, while 3.8 is "current")
  4. Use roll up combos for speed instead of many JS and CSS files (this disqualifies Google's CDN... if YUI 3 is actually hosted there which I couldn't find.)
  5. Site dynamically loads YUI dependencies (dependencies change regularly as I add functionality, going back to the configurator and saving a new bundle every time is a PITA)

显而易见的解决方案似乎是放弃目标#5和自主机组合。

The obvious solution appears to be to give up goal #5 and just self-host combos.

我如何达到所有5个目标?

推荐答案

解决它的最简单方法是从

http://yui.yahooapis.com/
https://yui-s.yahooapis.com/

The easiest way to solve it is to change base URL from
http://yui.yahooapis.com/ to
https://yui-s.yahooapis.com/

这篇关于什么是“正确”的使用YUI3和HTTPS的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆