Protocol Relative URL method not working in Chrome

Love searching on Stackoverflow for answers, but this is my first post. Hopefully others find this useful as well!

I have a site that needs to be https because it hosts facebook apps. I have it set up (dedicated IP and SSL certificate) but when I visited it via https I get the following warning:

This page has insecure content.

I did some research and discovered this is a common issue. Fixing our internal files is not a big deal, but we rely heavily on outside resources, like the jquery library (which is http not https). I used the Protocol Relative URL method (can't post link because I'm limited to two hyperlinks, so see comment below) which seems to work for a lot of people. However, when I made the changes in Chrome, I still get this warning: [blocked] The page at https://www.greetfeet.com/ ran insecure content from http://code.jquery.com/mobile/1.1.0/jquery.mobile.structure-1.1.0.min.css

If I'm having this issue I can only assume that my customers will be as well. Any idea how to fix this?

Thanks!


Google hosts commonly used libraries (including jQuery and jQueryUI) on HTTP and HTTPS both, eg:

https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js

(Use this whenever you can, your users might already have it in their browser cache, making your site load up faster.)

Other things you may need to host yourself unless reliably available for the public via HTTPS.

The protocol relative URL is only needed if your site is accessed via HTTP by some people and HTTPS by some other people: Making resource references "protocol relative" will make people request the resource using the same protocol they used to retrieve the referencing page itself. If your site is HTTPS-only, then you don't even need to use protocol-relative URLs, you can hard-code https:// everywhere. But it does not hurt, so you can use it nevertheless.


An https URL to JQuery? If it doesn't work, the problem is at the site, not in your code. If the site sends pages with http: URLs, non-relative, and you access it via https, you are engaged in mixed-content retrieval. Either don't visit those sites or don't use HTTPS.

链接地址: http://www.djcxy.com/p/42226.html

上一篇: 用NUnit驱动NDepend

下一篇: 协议相对网址方法无法在Chrome中使用