Salesforce.com : Refused to display ‘http://somewebpage’ in a frame because it set ‘X-Frame-Options’ to ‘SAMEORIGIN’.

Hey there,

I am getting an error while displaying a webpage in iframe in Salesforce console page. This page works fine in normal mode (Salesforce Cassic/ Lightning Experience). Only does not work in Console Page. When investigated more on this I could see the below error in the browser’s developer console.

Refused to display ‘http://somewebpage’ in a frame because it set ‘X-Frame-Options’ to ‘SAMEORIGIN’.

Displays in normal mode:

Salesforce Developer Edition

Error in Service Console:

Desctop screenshot

 

Resolution:

To resolve this i went through the below steps and hoping this could help some one out there as well.

Go to Setup > quick find > type Security Controls > click on Session Settings. Un-check the below two options and refresh the page in the console. The page should be displayed correctly. This will work mostly if it does not then you have to contact the vendor ,who is hosting the page you are referring to.  For more information about the X- Frame options go to the below link:

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

  • Enable clickjack protection for customer Visualforce pages with standard headers
  • Enable clickjack protection for customer Visualforce pages with headers disabled

 

Session Settings Salesforce Developer Edition

 

Hope this will help some one some time.

Keep reading and sharing … as sharing is learning….. 🙂

 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *