Search code examples
iframecross-domainsrc

Iframe content blocked


I have a page where I have an iframe using the following code.

<iframe name="SL" src="https://sl.se/sv/" width="100%" height="870px"></iframe>

It has been working without any problems, but yesterday it became a blank page in the iframe. I haven't updated anything in the page so it must be something in the iframe src that is blocking for some reason. Is there another way to get this page to show inside like an iframe, but with some other code?


Solution

  • If you see the console of your browser, it says:

    Refused to display 'https://sl.se/sv/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

    which means that they have disallowed loading of the resource in an iframe outside of their domain. For more information take a look at this.