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
Shruti NigamShruti Nigam 

Embed external website

Hi all,

I need to embed external webiste in vf page and also in lightning component using iframe. So do i need to disbale "Enable clickjack protection for non-Setup Salesforce pages"  cgeckbox  in salesforce.

Thanks in advance
Raghu NaniRaghu Nani
Hi Shruthi,

below link might helpful to you.
https://salesforce.stackexchange.com/questions/266372/how-to-show-an-outside-page-into-salesforce
Khan AnasKhan Anas (Salesforce Developers) 
Hi Shruti,

Greetings to you!

If the remote site blocks from loading itself in the iframe, there is not much that we can do. Clickjacking attacks, defenses like X-Frame-options, are rising in popularity and are preventing iframes from being a valid way to display content.

Here's the workaround to iframes:
Instead of using a web tab, a custom link can deliver the URL with the behavior set to:
- Display in a new window.
​- Display in the existing window without sidebar or header.

Please refer to the below links which might help you further.

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

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

https://salesforce.stackexchange.com/questions/166612/is-it-posible-to-add-iframe-directly-in-lightning-components

https://developer.salesforce.com/forums/?id=9060G000000UX9MQAW

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas