2014-09-26 35 views
4

谷歌翻譯作品完全在我的網站翻譯網站,但是當我需要添加一個校正我在控制檯這個問題:谷歌使用HTTPS

was loaded over HTTPS, but displayed insecure content from 'http://translate.google.com/gen204?client=te-alt&althighlight=1': this content should also be loaded over HTTPS. 

was loaded over HTTPS, but is submitting data to an insecure location at 'http://translate.google.com/translate_suggestion': this content should also be submitted over HTTPS. 

如何強制谷歌翻譯使用HTTPS?

回答

1

當你在你的腳本每次參考translate.google.com,確保是指它使用HTTPS和響應將是HTTPS了。希望這可以幫助!

乾杯!

0

的生命當你的頁面通過HTTPS加載,默認安全行爲是阻止任何通過HTTP加載的內容。

要合成的:

  • HTTP在HTTP:沒問題;
  • HTTP中的HTTPS:沒問題;
  • HTTPS中的HTTPS:沒問題;
  • HTTP中的HTTPS:可能的安全缺陷

如果您希望省去決定使用哪種協議的麻煩,請從G translate中刪除它:編寫您的URL //translate.google.com/...(不指定協議)。您的瀏覽器應自動使用與呼叫頁面相同的協議完成URL。

另一種選擇是始終通過HTTPS加載谷歌翻譯。