Share这个按钮在HTTPS网站上无法点击

编程入门 行业动态 更新时间:2024-10-24 14:15:17
本文介绍了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?

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

ReferenceError:未定义stLight

ReferenceError: stLight is not defined

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

Loading mixed (insecure) display content on a secure page "w.sharethis/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="ws.sharethis/button/buttons.js"></script> <script type="text/javascript"> stLight.options({ publisher:'12345', }); </script>

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

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

更多推荐

Share这个按钮在HTTPS网站上无法点击

本文发布于:2023-11-28 10:18:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641999.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:按钮   网站   Share   HTTPS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!