When using HTTPS, some content of the website does not display properly

Source: Internet
Author: User

In the Web site development process, the use of HTTP Site page everything is OK. But after the change to HTTPS, found that some pages of the site can not be displayed properly, such as the appearance of no style.

The reason is that in the program called jquery, and the URL of the reference is the HTTP protocol, and the site has been changed to use the HTTPS protocol, all calls are required to use HTTPS, so this problem occurs

For example, the following site: When you open with chrome, press F12, refresh the page, in Network-js, double-click Jquery-1.10.0.min.js, you can see the request URL is http://code.jquery.com/ Jquery-1.10.0.min.js. And this site uses HTTPS for access

This results in the loss of the style of the registration page language drop-down box

View the program source code, you can find that there is a line in the page code <script type= "Text/javascript" src= "Http://code.jquery.com/jquery-1.10.0.min.js" > </script> This directly leads to this problem

So we need to change it for <script type= "Text/javascript" src= "//code.jquery.com/jquery-1.10.0.min.js" ></script>

This way, run the page again, F12 view the Chrome browser:

As you can see, the style of the page drop-down box is out, and the URL to call jquery becomes the Https://code.jquery.com/jquery-1.10.0.min.js

When using HTTPS, some content of the website does not display properly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.