Share这个按钮在HTTPS网站上无法点击 [英] ShareThis buttons not clickable on HTTPS website

查看:181
本文介绍了Share这个按钮在HTTPS网站上无法点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将分享此按钮添加到我的安全网站,现在点击时会产生错误。错误如下所述。有没有人之前遇到过这个问题?

I have added "share this" buttons to my secure site and now they produce an error when clicked. Errors are mentioned below. Has anyone had this problem before?


阻止加载混合活动内容 http://w.sharethis.com/button/buttons.js

ReferenceError:未定义stLight

ReferenceError: stLight is not defined

在安全页面上加载混合(不安全)显示内容 http:/ /w.sharethis.com/images/facebook_32.png

Loading mixed (insecure) display content on a secure page "http://w.sharethis.com/images/facebook_32.png"


推荐答案

基本上,如果页面是通过HTTPS加载的,那么它所使用的每个资源也应该通过HTTPS加载。它是浏览器安全策略的一部分,就像同源政策等。

Basically if a page is loaded over HTTPS then every resource it uses should also be loaded over HTTPS. It's a part of browser security policy, just like Same-Origin Policy etc.

幸运的是,ShareThis可以通过HTTPS使用,如下所示:

Fortunately ShareThis can be used over HTTPS like this:

<script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">
    stLight.options({
        publisher:'12345',
    });
</script>

同样适用于您的脸书图标。只需使用以下网址: https://ws.sharethis.com/images/facebook_32.png

Same applies to your facebook icon. Just use this URL: https://ws.sharethis.com/images/facebook_32.png

这篇关于Share这个按钮在HTTPS网站上无法点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆