http content on a https page - Mixed content

后端 未结 2 1787
夕颜
夕颜 2020-12-20 04:52

I was wondering how I should do this.

I have some https pages, but need to call in some http content from my CDN provider.
The content I am wanting to load via h

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-20 05:52

    I know this has already had an answer accepted, but I think the following is a better solution:

    Try using protocol-less Urls.

    
    

    You can do the same with CSS:

    
    

    Note the lack of https or http in the urls. The browser will determine the appropriate protocol. No more mixed content warnings / errors.

提交回复
热议问题