I want to render an External Web page in an IFRAME in custom VF page and retrieve cookies generated by that page in the salesforce.

However, I have tried loading that in both apex:iframe as well as in html iframe but getting this error: Refused to display 'https://sitename.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

ref URL: https://help.salesforce.com/articleView?id=IFRAME-or-Web-Tab-Content-Displays-Blank-Page-1327107637323&type=1

2 Answers 2


We too had faced the same issue. If the External Web page that you are trying to include in an iFrame is in your control you can check if you can set X-Frame-Options:ALLOW-FROM https://example.com/

Source - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options

In this case your iFrame may work as expected.

  • But configuring headers for that page is not possible for us. :(
    – Arun kharb
    Jan 24, 2017 at 5:54

You can also check this behaviour by adding a widget called ignore x- frame headers on chrome.

If the add on is enabled you would be able to see the page but when the you disable it you will be having the issue.

However, this option is something that is set from the publisher side.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .