Github pages can't be included in a Shiny app using iframe?

anyone know have to display a github pages webpage in a shiny app?

I have tried several previous solutions, but they did not work. I tried to use local html fiels, and includeHTML(html_file). But I used d3 in my html file, thus I have to upload these html files to a server first. My second try is tag$iframe. I updated the html files to github pages, and they works well if I visit the link directly. But when I include the link in a shiny app using tag$iframe, the page was simply blank. Below is the code for the tag$iframe option (which does not work).

output$gbaPlot1 <- renderUI({
tags$iframe(seamless="seamless", 
src='http://conxz.net/', width='100%')
})

I expected github pages would show within the shiny app. But it was just blank.

1 Like

Sometimes there are browser / site exclusions that disable this type of behavior. I.e. certain websites can add headers (usually X-Frame-Origin) to their site that prohibit being put inside an iframe.

If you open up your "Browser Devtools," you should be able to see the headers on the website when you load it in its own browser window and can look for X-Frame-Origin. Similarly, when you open up your iframe, there should hopefully be some Browser Devtools Console errors or something that helps clarify whether this is the type of thing you are running into.

For instance, in chrome: