Click here to Skip to main content
16,014,591 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 29-Jun-16 4:09am
Comments
Sergey Alexandrovich Kryukov 29-Jun-16 9:59am    
Using iFrame is not the best idea. You can much better use some element on the same page, such as div.
iframe works like a page inside a page; this is a page with different URL, so you don't control its content. So why using it? The only problem is: on what events do you want to refresh the news content? What initiates the change of content? The rest of the problem is trivial...
—SA

1 solution

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[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 29-Jun-16 11:31am    
5ed. I did not pay attention that the news are supposed to be taken from Google.
Even with a correct solution, don't you think the whole goal is wrong? The massive use of non-original content is the the plaque of the Web, major kind of noise, distraction, waste of bandwidth, garbage... If people don't have enough to say, they should not publish sites...
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900