Embedding web pages in my plotly app

I need to create an application that opens a series of sections in the page in which the content of each section is a specific web page contained in a configuration file.

I have tried Iframe but it does not work because most of the web pages refuse to connect for different reasons:

  • Refused to display ‘https://…my web site…/’ in a frame because it set ‘X-Frame-Options’ to ‘sameorigin’.
    or
  • Refused to frame ‘https://… another web site …/’ because an ancestor violates the following Content Security Policy directive: "frame-ancestors ‘self’ *… web site …

Then I tried to read myself the content of the web sites and put as srcDoc in the Iframe. I see something in this case but all the figures and css are not resolved, of course.

I tried to use the myBrowser object but this just open a new browser with the lin I specified. After opening I have no possibility to set in a specific position or mae it without menu etc.

Is there a way to have an object browser of dash that then can be controlled (size, position, url etc) ?

This is what I would like to realize:

Hello @annunal,

What you are encountering is security on those individual sites, these are normal protection against the very thing you are trying to do.

The reason this exists:

  • When hosted in an iframe, you can see the network traffic that the user inputs. Very bad if related to banking or other personal info.
  • When hosted in an iframe, you can exposed it to a thing called XSS.

Not really sure there is a way around this, unless these sites provide a way to embed their site in others.

Thanks Jinnizor,

so the only way to do it is writing javascripts and open local browsers, I suppose. I wanted to avoid writing a programme for this and give th epossibility to use a normal browser to get the composition of the sites

1 Like

Now, if you owned the sites, it would be a different story, as you could adjust the headers to allow control and allow iframes.