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
Akshay ShrivastavaAkshay Shrivastava 

Iframe is not showing anything

<apex:page >
   <iframe height="600px" id="theIframe" name="theIframe" src="https://salesforce.com" width="100%"></iframe>
</apex:page>

When I am trying to preview the above Visualforce page. it shows error
www.salesforce.com refused to connect.
 Can anyone help me with this.
Thanks
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Akshay,

I have followed the below question in the stack exchange .

https://stackoverflow.com/questions/8700636/how-to-show-google-com-in-an-iframe
 
<apex:page showHeader="false">
     <apex:iframe src="https://www.google.com/webhp?igu=1" scrolling="true" id="theIframe"/>
</apex:page>

I used the above as Iframe and it is working as expected.

If this solution helps, Please mark it as best answer.

Thanks,
​​​​​​​
Akshay ShrivastavaAkshay Shrivastava
try any other Url like salesforce.com, Youtube.com. It won't work. 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Akshay,

Did you try some other browser like mozilla other than google?

Thanks,
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Akshay,

I found the below article. Can you check this may help you.

https://help.salesforce.com/s/articleView?id=000322792&type=1 (https://help.salesforce.com/s/articleView?id=000322792&type=1)

Thanks,
 
Akshay ShrivastavaAkshay Shrivastava
Yes I used Microsoft edge But showing same result
 
Shatrughna Salunke 23Shatrughna Salunke 23
I'm having the same issue as you, and I've tried everything I can think of to solve it, but I've had no luck. Do you have a solution for the same?