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

cross domain issue when embedding a vf page into a page

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

My iframe tag is <iframe src=""  frameborder="0" scrolling="no" id="iframe" />

Any ideas greatly appreciated.


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

Hi Fredrick, 

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



Ashish AgarwalAshish Agarwal
Hi Fredrick,

I know there are many limitations we have on page and that's why we are bound to  use Iframe to show the VF page on 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.