Adding VisualForce page(already exposed in sites) in studio using an Iframe

In a page I have an iframe and I want to access the vf page in this iframe. when I use the internel link of this vf page( as an iframe using site studio page (for testing purpose)and stay login to the org where this vf page is existing at that time it is working fine.

The exposed url( for that vf page is working in browser .

So now when I want to use this vf page as an iframe of a studio page I am just using this exposed url in iframe but it is showing the blank iframe.

Not sure of how to implement this.

Thanks in advance


You need to make sure that the iframe src attribute uses the Site URL and not the instance URL and you need to make sure that the URL is https. If you use http the browser will likely not load the iframe. If you view your browser’s JavaScript console you’ll see something like

[blocked] The page at ‘‘ was loaded
over HTTPS, but ran insecure content from ‘‘:
this content should also be loaded over HTTPS.

This will not work (doesn’t use site URL):

<iframe src="" /> 

This will not work (not https):

<iframe src=" /> 

You can use the following. The browser will use the protocol of the current page which will be https in the studio and http when the page loads over http outside of the studio.

<iframe src="//" />

Source : Link , Question Author : Sagar Vadariya , Answer Author : Peter Knolle

Leave a Comment