Including Twitter Widgets.js via HTTPS

后端 未结 6 2118
面向向阳花
面向向阳花 2021-02-08 03:23

I\'m having a minor problem with Mixed-content on HTTPS served pages on our site, when we include the http://platform.twitter.com/widgets.js

Apparently Twitter doesn\'t

6条回答
  •  梦毁少年i
    2021-02-08 03:38

    A good solution for this kind of thing is to leave the http: or https: out of the src or href attributes of included content. Usually the browser can figure out which protocol to use.

    In your case, you can use //platform.twitter.com/widgets.js as the url to the file now that Twitter serves things over https.

提交回复
热议问题