Get referrer in Apex Visualforce

apex-codesalesforcevisualforce

Is it possible to get the referrer from a salesforce page that im editing in visualforce?

Im using the following APEX method

return ApexPages.currentPage().getUrl();

… the above only returns the current url and the previous or referrer

Best Answer

public String getReferer(){
   return ApexPages.currentPage().getHeaders().get('Referer');
}
Related Topic