We're a consulting agency and work with a large number of salesforce customers. We developed a simple visualforce sidebar component that we are trying to load into all of our customers instances to allow them to easily contact us for support.
The issue we are having is that one of our customers the visualforce iframe in the sidebar is being rendered from force.com while the rest are just served using relative urls (so would be served from salesforce.com)
<iframe frameborder="no" height="0px" id="066F0000002GTYI" marginheight="0" marginwidth="0" name="066F0000002GTYI" scrolling="no"
src="https://tjwf--c.na10.visual.force.com/apex/Intercom?autoMapValues=1&inline=1&core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&sfdcIFrameOrigin=https://tjwf.my.salesforce.com/home/home.jsp&sdfcIFrameOrigin=https://tjwf.my.salesforce.com/home/home.jsp"
title="Intercom" width="100%"></iframe>
And the same homepage component page on another clients looks like this
<iframe frameborder="no" height="0px" id="066d0000002EmhU" marginheight="0" marginwidth="0" name="066d0000002EmhU" scrolling="no"
src="/apex/Intercom?autoMapValues=1&inline=1&core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&sfdcIFrameOrigin=https://na14.salesforce.com/003/o&sdfcIFrameOrigin=https://na14.salesforce.com/003/o"
title="Intercom" width="100%"></iframe>
note that the important difference here is the SRC property for one of them starts with src="https://tjwf--c.na10.visual.force.com" wile the other is simply src="/apex"
They are both setup exactly the same as visualforce "homepage components". Any ideas why this is different?
UPDATE:
It was suggested that it migth be related to "my domain" being turned on but we have another client who also has that turned on and there iFrame still has a relative url?
See full iframe below
<iframe frameborder="no" height="0px" id="066U0000000xZ7Q" marginheight="0" marginwidth="0" name="066U0000000xZ7Q" scrolling="no"
src="/apex/Intercom?autoMapValues=1&inline=1&core.apexpages.framework.ApexViewServlet.getInlinedContentRequest=1&sfdcIFrameOrigin=https://posse.my.salesforce.com/home/home.jsp&sdfcIFrameOrigin=https://posse.my.salesforce.com/home/home.jsp"
title="Intercom" width="100%"></iframe>
UPDATE 2
So thanks to @mattandneil for taking the time to look at my setup. No solutions to why the iframe would serve differently but I did find an even better work around.
I was able to pass user and org data into the javascript via query parameter and get the functionality I needed for my intercom plugin by passing like this
{!REQUIRESCRIPT("/resource/Intercom"+"?email="+$User.Email+"&name="+$User.FirstName+" "+ $User.LastName+"&company="+$Organization.Name+"&orgId="+Organization.Id+"&appId=YOURAPPIDHERE")}
So i was able to bypass my need to read data from the viusalforce iframe all together. the You can the the steps and the plugin code here: https://github.com/familiar-studio/salesforce-intercom
BUT, the larger question still stands, why would the homepage component behave differently in the two different orgs?
Session Settings
are identical and Static Resource Critical Update setting was identical. Yet they generate different iframe markup. Interesting!