Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an issue opening a https page within an frame

I programmatically create a html report, split into two frames. If the user then clicks on a hyperlink on the right hand frame the frame is replaced with the contents of the page.

This worked fine but now when i try to link to any Discogs release page such as this one it doesn't load it

Ive noticed Discogs have moved to secure http, I wonder if this is the issue. Although I can go to other https page such as this Acoustid one without a problem.

If I open the first link in a new tab using target="_blank" it then works okay but that is not what I want.

like image 983
Paul Taylor Avatar asked Nov 02 '16 15:11

Paul Taylor


People also ask

Can you use iframe with HTTPS?

Navigating or redirecting to an HTTP URL in an iframe embedded in an HTTPS page is not permitted by modern browsers, even if the frame started out with an HTTPS URL. The best solution I created is to simply use google as the ssl proxy...

How do you open a link in a frame?

The iframe tag is used to display a web page inside a web page. When you create a document to be inside an iframe, any links in that frame will automatically open in that same frame. But with the attribute on the link (the element or elements), you can specify where the links will open.

How do I fix refused connection in iframe?

You cannot fix this from Power Apps Portal side. Most probably web site that you try to embed as an iframe doesn't allow to be embedded. You need to update X-Frame-Options on the website that you are trying to embed to allow your Power Apps Portal (if you have control over that website).


1 Answers

You can see root cause of this problem by opening Developer Tools in Chrome. If I got your problem right, I reproduced it in simple HTML page:

<html>
<body>
    <iframe src="https://www.discogs.com/release/1000"></iframe>
</body>
</html>

enter image description here

It's not a problem of HTTPs. The message says:

Refused to display 'https://www.discogs.com/release/1000' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

It means that Discogs blocks showing their content in frames in other origins than discogs.com. You cannot do anything with it.

like image 87
Maciej Walkowiak Avatar answered Oct 25 '22 11:10

Maciej Walkowiak