Coolguy
Coolguy

Reputation: 2285

html iframe just show nothing

I'm just want to show a web page within a webpage by using the iframe. I've try just a simple code below:

<iframe src="http://edition.cnn.com/" id="i_frame"></iframe>

JSFIDDLE

But nothing shows up? Any ideas why?

Upvotes: 0

Views: 1820

Answers (2)

Rahul Desai
Rahul Desai

Reputation: 15491

Did you check the Javascript console? enter image description here

So, the browser blocks it because you are loading HTTP site in a HTTPS site.

Upvotes: 1

charlietfl
charlietfl

Reputation: 171679

If you look in your browser console you will see that it is being blocked since the fiddle is on https and the iframe is on http protocol.

It works fine if you load fiddle on http protocol.

Working demo

for more information read up on Mixed Content Security in browsers

Upvotes: 2

Related Questions