在网址中使用https时,谷歌翻译不显示 [英] google translate not showing up when https is used in url

查看:210
本文介绍了在网址中使用https时,谷歌翻译不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,当你去网址时 https://www.improvementskills.org/index.cfm 谷歌翻译没有显示,但是当你去 http://www.improvementskills.org /index.cfm 它工作正常。所以我知道问题在于SSL和https。有谁知道问题是什么以及如何解决它。谢谢!

For some reason when you go to the url https://www.improvementskills.org/index.cfm google translate does not show up, but when you go to http://www.improvementskills.org/index.cfm it works fine. So I know the issue is with SSL and having https. Does anyone know what the problem is and how to fix it. Thanks!

推荐答案

您正在使用 http 网址加载Google的JavaScript,即使您的网页使用 https 投放。浏览器拒绝这一点,因为在 https 页面中包含非 https 内容是不安全的。

You are loading Google's JavaScript with an http URL, even when your page is served with https. The browser rejects that, because it's insecure to include non-https content in an https page.

你需要这样做:

<script type="text/javascript" src="//translate.google.com/...

而不是将URL指定为 http://translate.google.com / ... 通过以双斜杠开头的URL,浏览器将使用 http中的任何一个 https 页面本身正在使用。

rather than specifying the URL as http://translate.google.com/... By starting the URL at the double-slash, the browser will use whichever of http or https the page itself is using.

这篇关于在网址中使用https时,谷歌翻译不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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