在 SSL 站点中托管 YUI - IE 错误

发布于 2024-08-08 09:00:58 字数 437 浏览 2 评论 0原文

我在我的网站上使用 YUI。当您通过 HTTP 访问时,它工作正常,没有错误。但是,当 IE 用户通过 HTTPS 访问该网站时,他们会收到可怕的 “此页面包含安全和不安全的项目”< /a> 错误消息,这使得它几乎无法使用。

我托管 YUI 文件,因此它们通过 HTTPS 提供服务,但在 CSS 文件中,它仍然通过 HTTP 引用图像文件,这会导致 IE 错误消息出现:

background:url(http://yui.yahooapis.com/2.7.0/build/assets/skins/sam/sprite.png)

对于抑制此错误有任何建议吗? CSS 中引用了大量的 HTTP 链接。

I'm using YUI on my site. It works fine with no errors when you access over HTTP. However, when IE users access the site over HTTPS they get the dreaded "this page contains secure and nonsecure items" error message, which makes it really close to unusable.

I'm hosting the YUI files, so they're getting served up over HTTPS, but in the CSS file, it's referencing an image file over HTTP still which causes the IE error message to appear:

background:url(http://yui.yahooapis.com/2.7.0/build/assets/skins/sam/sprite.png)

Any suggestions for suppressing this error? There are a ton of HTTP links referenced in the CSS.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

烟若柳尘 2024-08-15 09:00:58

如果您想使用托管文件,您
可以在雅虎和谷歌之间选择
内容交付网络。雅虎的
网络支持组合处理;
Google 支持 SSL。

查看 YUI 依赖项配置器

选择 Google 作为您的 CDN 并更改基础网址为 https://

If you wish to use hosted files, you
can choose between Yahoo and Google
Content Delivery Networks. Yahoo's
network supports combo-handling;
Google's supports SSL.

Check out the YUI Dependency Configurator

Select Google as your CDN and change the base url to https://

¢好甜 2024-08-15 09:00:58

转到 http://developer.yahoo.com/yui/2/ &下载完整的开发工具包,将构建文件夹复制到您想要托管 YUI 的任何位置。在 YUI CSS 中进行全局搜索/替换

http://yui.yahooapis.com/2.7.0/build/


和将其替换为站点上 YUI 构建文件夹的路径。我假设您从 YUI 依赖工具中获取了组合 CSS你不需要,所以这是转换它的最简单的方法。

Go to http://developer.yahoo.com/yui/2/ & download the full developer kit, copy the build folder to wherever you want YUI to be hosted. Do a global search/replace in your YUI CSS for

http://yui.yahooapis.com/2.7.0/build/

and replace it with the path of the YUI build folder on your site. I'm assuming you grabbed the combined CSS from the YUI dependency tool & you don't need, so that's the easiest way to convert that.

独守阴晴ぅ圆缺 2024-08-15 09:00:58

您必须更改链接才能通过 HTTPS。我不知道雅虎的 YUI 服务器是否允许这样做(或者您可以自己托管它们并将 css 文件重定向到您的服务器),但这是摆脱该消息的唯一方法。

You are going to have to change the links to go over HTTPS. I don't know if the YUI server at yahoo allows this (or you can host them yourself and redirect the css file to point to your server), but it's the only way to get rid of the message.

忆依然 2024-08-15 09:00:58

从不安全的 URL 引用资产将引发此警告。 SSL 要求所有内容均通过安全 URL 提供。要么在本地托管文件,要么查看雅虎是否提供源文件的安全选项。

referencing assets from no secure urls is going to throw this warnings. SSL requires everything to be served from secure urls. Either host the files locally, or see if yahoo offers a secure option of the source files.

奢欲 2024-08-15 09:00:58

将所有内容托管在您这边并使用相对 URL 通常是避免 SSL 出现任何问题的最佳选择。

我建议您下载该文件,将其托管在您这边,并且不要使用任何绝对(http 或 https)URL。

Hosting everything on your side and using relative URLs are generally the best options for not facing any problems with SSL.

I suggest you download that file, host it on your side and not use any absolute (http or https) URLs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文