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?

Blocked 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"

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 0
Add a ment  | 

2 Answers 2

Reset to default 12

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.

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