Iframe content blocked

Tobaunta Torkelsson picture Tobaunta Torkelsson · Apr 6, 2018 · Viewed 7.2k times · Source

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?

Answer

Nasser Tahani picture Nasser Tahani · Apr 6, 2018

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.