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
FredrickUNFredrickUN 

cross domain issue when embedding a vf page into a site.com page

I'm trying to enbed a visualforce page into a site.com page using an iframe but I keep getting a cross domain error.

My iframe tag is <iframe src="https://qasandbox-test.cs17.force.com/PageRedirect?e=a0Pw00000005945EA"  frameborder="0" scrolling="no" id="iframe" />

Any ideas greatly appreciated.

cheers
Vinita_SFDCVinita_SFDC
Hello,

Please share exact error you are getting, also let me know are you referring content in your site from more than one Org?
Ashish_SFDCAshish_SFDC

Hi Fredrick, 

iFrame is not one of the best practices to use, are you getting any specific error that we can look at?

Regards,

Ashish

Ashish AgarwalAshish Agarwal
Hi Fredrick,

I know there are many limitations we have on site.com page and that's why we are bound to  use Iframe to show the VF page on Site.com page.

I had the same situation you have and the HTML5 new iframe attribute "Sandbox" will solve your problem.

Please take care when you use the iframe and secre your site by specifying right access in sandbox attribute.

Hope this will help you.


Sujaka