我遇到了加载问题
https://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.js(httpS)
但下载没有问题
http://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.js(http)
结果是:它没有加载,萤火虫说
https://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.js Status Aborted
如果我使用http(而不是https),那么它看起来没问题:200 OK
。
为什么会发生这种情况以及如何解决?
他们不允许使用httpS吗?
答案 0 :(得分:1)
jQuery.com上托管的库是由不支持https://的CDN提供的,这就是您收到错误的原因。
如果您确实希望通过https://发送jQuery(移动版),则可以使用Google或Microsoft CDN。可悲的是,谷歌并没有托管jQuery Mobile库,而微软并没有托管1.3.0 RC版本。
来自Microsoft SDN托管的jQuery移动版的最新版本(可以通过https访问)是1.2.0:
https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile.structure-1.2.0.css https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile.structure-1.2.0.min.css https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile.theme-1.2.0.css https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile.theme-1.2.0.min.css https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.css https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.js https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.css https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/jquery.mobile-1.2.0.min.js https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/images/ajax-loader.gif https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/images/ajax-loader.png https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/images/icons-18-black.png https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/images/icons-18-white.png https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/images/icons-36-black.png https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.2.0/images/icons-36-white.png