function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
UMANG GARGUMANG GARG 

I have included Iframe in VF page but it is not displaying.

I have included Iframe in VF page but it is not displaying.
Thing i have done :
1) Allowed All cookies
2) Unchecked - 'Enable clickjack protection for customer Visualforce pages with standard headers'
3) Added the URL in 'Whitelisted Domain for VF'
Still, it is not working.
Could anyone provide any solution for this.
Code snippet -
<apex:page showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0" controller="testIframeController">
        <apex:iframe src="https://www.salesforce.com" id="theFrame" height="500px" width="1000px"/>
 
</apex:page>


 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Umang,

Have you checked the console in browser to see if there are any errors??

Regards,
Anutej
UMANG GARGUMANG GARG
Hi Anutej,

Below is the error that i got:
Refused to display 'https://www.salesforce.com/in/?ir=1' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Regards,
Umang
ANUTEJANUTEJ (Salesforce Developers) 
Can you try unchecking 'Enable clickjack protection for customer Visualforce pages with headers disabled'
UMANG GARGUMANG GARG
Yes, I have tried that but no luck.
Both the below setting are unchecked :
Enable clickjack protection for customer Visualforce pages with standard headers 
Enable clickjack protection for customer Visualforce pages with headers disabled
James BuckelewJames Buckelew
Did you find a solution to this?