1

I want to load another page using HTML iframe but Firefox blocks it due to avoid security problems. .

I've tried to chnage the "https" to "http" but it doesn't work.

The error shown by Firefox:

Firefox Can’t Open This Page To protect your security, anouar.stencila.io will not allow Firefox to display the page if another site has embedded it. To see this page, you need to open it in a new window. 

This is the code used:

<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Reproducible Article</title> </head> <body> <!-- The header of the file --> <p> <a href="https://ojs3.josekarvalho.net/index.php/rp/article/view/87/176" target="_blank" >Link to HTML version</a > | <a href="https://ojs3.josekarvalho.net/index.php/rp/article/view/87/181" target="_blank" >Link to PDF version</a > </p> <!-- The iframe to be shown - the link to the reproducible article allowfullscreen --> <iframe src="https://anouar.stencila.io/gentsch2020/" frameborder="0" style="position: absolute; top: 80px; left: 0; width: 100%; height: 100%" scrolling="yes" title="Reproducible Article" ></iframe> </body> </html> 
2
  • 1
    On a phone so can't really check but this really sounds line the website you try to embed sends an x-frame-options header or similar preventing iframes. Not much you can do if you don't have access to their backend. Commented Mar 14, 2021 at 11:52
  • @Kaiido thanks for the reply, which backend you mean ? Commented Mar 14, 2021 at 12:23

1 Answer 1

2

The page https://anouar.stencila.io/gentsch2020/ is served with the following X-Frame-Options header:

x-frame-options: allow-from *.ojs3.josekarvalho.net 

ALLOW-FROM isn't supported by any up to date browser, so it won't work. You either need to use SAMEORIGIN when possible or remove the header completely.

X-Frame-Options can be replaced with Content-Security-Policy: frame-ancestors <source>;, see MDN.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the answer, but I didn't understand how to remove the X-Frame-Options header, and I need the link of ojs3.josekarvalho.net to call the page with this url

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.