Uncaught SecurityError: Blocked a frame with origin "https://c.na15.visual.force.com" from "page address is here "accessing a frame with origin "https://na15.salesforce.com". Protocols, domains, and ports must match.

I am using this line of jquery code:


Requirement is to modify SF1 header or remove. If I would be able to access element outside , iframe, then i can modify the header.

There is a help link saying something about CORS :cors. But i am understanding how, to achieve this. My Goal is to modify the header only. why do i need to call Rest Service or Chatter Rest Api

  • 1
    One solution could be a use of Window.postMessage(). It enables cross-origin communication. Mar 5, 2015 at 14:34
  • @mast0r: will it be able to change the html content using jquery.outside the iframe.
    – Ankuli
    Mar 5, 2015 at 15:04
  • 1
    It allows to run a javascript code on the parent page from the iframe. But it is potentially vulnerable. You will have to configure it properly. Mar 5, 2015 at 15:05
  • I can not add/change anything in target domain. situation is like: there is a html page, inside this my iframe reside, and i have full control over iframe. but not over main page.
    – Ankuli
    Mar 5, 2015 at 15:08
  • So you are out of luck then... Mar 5, 2015 at 15:09


You must log in to answer this question.

Browse other questions tagged .