admin管理员组文章数量:1287199
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?
Blocked loading mixed active content ".js"
ReferenceError: stLight is not defined
Loading mixed (insecure) display content on a secure page ".png"
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?
Share Improve this question edited Jan 14, 2014 at 16:13 Max 22.4k6 gold badges53 silver badges77 bronze badges asked Jan 14, 2014 at 16:08 user2434592user2434592 511 silver badge2 bronze badges 0Blocked loading mixed active content "http://w.sharethis./button/buttons.js"
ReferenceError: stLight is not defined
Loading mixed (insecure) display content on a secure page "http://w.sharethis./images/facebook_32.png"
2 Answers
Reset to default 12Basically 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.
Fortunately ShareThis can be used over HTTPS like this:
<script type="text/javascript" src="https://ws.sharethis./button/buttons.js"></script>
<script type="text/javascript">
stLight.options({
publisher:'12345',
});
</script>
Same applies to your facebook icon. Just use this URL: https://ws.sharethis./images/facebook_32.png
Also for those that are having trouble debugging this stuff make sure to check out that your browsers aren't blocking ShareThis through an add-on.
Ref: stLight not defined issue related to addons
本文标签: javascriptShareThis buttons not clickable on HTTPS websiteStack Overflow
版权声明:本文标题:javascript - ShareThis buttons not clickable on HTTPS website - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741264494a2368213.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论