17

最近、自分のドメインにSSL証明書を適用しましたが、HTTP://で自分のWebサイトを表示すると、一部のスタイルに問題があります。スタイルは問題ありません。ただし、HTTPS://で表示する場合、スタイルはまったく適用されません。

私は問題が何であるかを知りました。HTTPSを介してサードパーティのスタイルをロードしていませんでした。HTTPSに切り替えたところ、すべての問題が解決しました。

4

2 に答える 2

23
于 2013-03-16T17:46:47.873 に答える
6

If the requested URI is https, if you have resources on the page (images, stylesheets, JavaScript files et. al.) that are requested with the http scheme some browsers may block them because they are considered insecure. You can circumvent that per-browser, but you also have alternatives in your code:

  1. Use https to request everything, or at least match the schems.
  2. Use // to indicate the scheme. The browser will match the scheme with the request URI. For example: <link rel="stylesheet" type="text/css" href="//example.com/path/to.css">
于 2013-03-16T17:52:58.720 に答える