I found the following method for S1 server side detection on github:

//Determin if this is SF1 app
public static Boolean isSF1(){
    if(!Utils.checkNullOrBlank(ApexPages.currentPage().getParameters().get('sfdcIFrameHost')) ||
        !Utils.checkNullOrBlank(ApexPages.currentPage().getParameters().get('sfdcIFrameOrigin')) ||
        ApexPages.currentPage().getParameters().get('isdtp') == 'p1' ||
        (ApexPages.currentPage().getParameters().get('retURL') != null && ApexPages.currentPage().getParameters().get('retURL').contains('projectone') )
        return true;
        return false;

It does the trick and is a very handy piece of code.

However, I can't seem to find any explanation of the parameters it's checking:

  1. sfdcIFrameHost

  2. sfdcIFrameOrigin

  3. isdtp

  4. projectone

Does anyone know anything about these parameters?

  • 1
    They are various parameters regarding embedded pages. Technically, they are "internal use only", but we ingenious developers often leverage internal parameters to great effect.
    – sfdcfox
    Nov 29, 2014 at 16:31
  • Cheers @sfdcfox, much appreciated! I was really hoping for some official Saleforce documentation on them, but as seems to be the case with almost everything S1 related, developers are hacking and slashing their way through on their own!
    – Daft
    Dec 1, 2014 at 11:33

1 Answer 1


Hard to give a true explanation as Salesforce hasn't released that so we can only guess.

isdtp appears to be used to define how the page is rendered: www.ca-peterson.com/2011/11/magic-isdtp-param.html

sfdcIFrameOrigin and sfdcIFrameHost seem to be two parameters passed on mobile only (at this time).
sfdcIFrameOrigin is probably used to resolve some cross site scripting issues. sfdcIFrameHost when I inspected it in the desktop version of the one app was set to web whereas from the mobile device it was set to hybrid so I guess it helps the app determine what type of environment it is in.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .