如果你可以帮我把这个自我评级的小部件显示在SSL网站上 - 非常感谢。
<div id="TA_cdsratingsonlynarrow580" class="TA_cdsratingsonlynarrow">
<ul id="dF0s584INkwO" class="TA_links kjnywQtL">
<li id="wA7uHohwd" class="xMdwzDT2ZgOJ">
<a target="_blank" href="https://www.tripadvisor.ca/">
<img src="https://www.tripadvisor.ca/img/cdsi/img2/branding/tripadvisor_logo_transp_340x80-18034-2.png" alt="TripAdvisor"/>
</a>
</li>
</ul>
</div>
<script src="https://www.jscache.com/wejs?wtype=cdsratingsonlynarrow&uniq=580&locationId=1146548&lang=en_CA&border=false&display_version=2">
</script>
答案 0 :(得分:2)
Tripadvisor小部件存在一个已知问题,即在SSL通道中尝试加载非SSL网址。有一个解决方法;请参阅以下链接
https://thechamplord.wordpress.com/2015/03/25/how-to-make-tripadvisor-widget-work-on-https/
- 小部件中的脚本src是一个jscache URL
https://www.jscache.com/wejs?wtype=cdsratingsonlynarrow&uniq=580&locationId=1146548&lang=en_CA&border=false&display_version=2
- 当您在浏览器中打开它时,您会获得它指向的JavaScript代码段。
document.write(<script src="http://www.tripadvisor.com/WidgetEmbed- cdsratingsonlynarrow? amp;locationId=1146548&border=false&uniq=580&lang=en_CA&display_version=2"></script>' )
- 注意代码段中的脚本src指向HTTP URL
http://www.tripadvisor.com/WidgetEmbed-cdsratingsonlynarrow?amp;locationId=1146548&border=false&uniq=580&lang=en_CA&display_version=2
- 现在使用这个新URL但使用HTTPS协议/前缀更改窗口小部件中的脚本src。
<script src="https://www.tripadvisor.com/WidgetEmbed-cdsratingsonlynarrow?amp;locationId=1146548&border=false&uniq=580&lang=en_CA&display_version=2">