simple iframe is not displayed on github pages

2019-07-13 05:38发布

I regularly embed iframes in my github.io pages but this one fails - I can't see why.

The iframe:

<iframe src="http://www.javarepl.com/embed.html" style="width: 500px; height: 130px; border: 0px"></iframe>

Embedded at several places in this page - and not showing up:

https://seinecle.github.io/codapps/generated-html/essential-notions-of-code.html

(note: when loading the html page locally, the iframe does show up).

1条回答
老娘就宠你
2楼-- · 2019-07-13 06:31

Check your browser console and you'll see the error:

Mixed Content: The page at 'https://seinecle.github.io/codapps/generated-html/essential-notions-of-code.html' was loaded over HTTPS, but requested an insecure resource 'http://www.javarepl.com/embed.html'. This request has been blocked; the content must be served over HTTPS.

You can't embed HTTP frames in an HTTPS document. You may want to contact the operator of that web site to ask them to enable HTTPS.

查看更多
登录 后发表回答