为什么这个网址没有加载到iframe中? [英] Why doesn't this url load in an iframe?

查看:101
本文介绍了为什么这个网址没有加载到iframe中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能为我的生活找出为什么这不会加载在iframe中?它返回一个

的空白页?



   CDV大气截面  <   iframe     src   =  http://www.emc。 ncep.noaa.gov/mmb/nammeteograms/images_off/702960.cloud.gif\"   width   =  100%    height   =  600 >  <   / iframe  >  





在浏览器窗口中粘贴网址看起来效果很好,所以wha问题是什么? NOAA会对iFrames进行评价吗?



我尝试过的事情:



Loading URL工作得很好,不确定iFrame可能有什么用?

解决方案

该网站返回一个带有SAMEORIGIN值的X-Frame-Options ...这意味着只有来自同一来源(网站)的网页可以在iframe中显示内容...

X-Frame-Options响应头 - HTTP | MDN [ ^ ]

I cannot for the life of me figure out why this will not load in an Iframe? It returns a
blank page?

 CDV Atmospheric Cross Section <iframe src="http://www.emc.ncep.noaa.gov/mmb/nammeteograms/images_off/702960.cloud.gif" width="100%" height="600"></iframe>



Pasting the URL in a browser window seems to work great, so what's the issue? Does NOAA blaock iFrames?

What I have tried:

Loading the URL works fine, not sure what's possibly up with the iFrame?

解决方案

That site returns an X-Frame-Options with SAMEORIGIN value...That means that only pages from the same origin (site) can display content in iframe...
The X-Frame-Options response header - HTTP | MDN[^]


这篇关于为什么这个网址没有加载到iframe中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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