使用iframe在aspx页面中显示新闻Feed [英] To show news feed in aspx page using iframe

查看:73
本文介绍了使用iframe在aspx页面中显示新闻Feed的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想加载https://news.google.com/ on和aspx页面,目前我使用iframe但是iframe不支持https 。



其他任何工作?



我尝试过的事情:



我尝试过使用IFRAME选项,想知道是否还有其他解决方案。

Hi,

I want to load https://news.google.com/ on and aspx page,currently i am using iframe but iframe doesnt support https.

Any other work around ?

What I have tried:

I have tried using IFRAME option and want to know if any other solution is possible.

推荐答案

问题是 iframe 不支持HTTPS。



问题是您尝试加载的网站会发送 X-Frame-Options标题 [ ^ ]设置为SAMEORIGIN,意味着只有同一域上的网页可以在 iframe 中显示该网站。



这是故意做的,以阻止人们正确地做你自己试图这样做。



谷歌新闻API已被弃用多年,所以你也不能将它作为一种解决方法。



您最好的选择似乎是使用RSS源:

使用Google新闻RSS Feed - 新闻帮助 [ ^ ]
The problem is not that the iframe doesn't support HTTPS.

The problem is that the site you're trying to load sends the X-Frame-Options header[^] set to "SAMEORIGIN", meaning that only pages on the same domain may display the site in an iframe.

This was done deliberately to stop people from doing precisely what you are trying to do.

The Google news API has been deprecated for several years, so you can't use that as a workaround either.

Your best option seems to be to use the RSS feeds:
Using Google News RSS Feeds - News Help[^]


这篇关于使用iframe在aspx页面中显示新闻Feed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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