I have a VisualForce page inside a standard SFDC Page Layout. For UX reasons, we want to be able to refresh the outer (parent) page when something is clicked on the VF page. When we try and do this using parent.location.reload(), we get the CORS JS error:

Uncaught SecurityError: Blocked a frame with origin "https://my_domain.c.cs20.visual.force.com" from accessing a frame with origin "https://my_domain.cs20.my.salesforce.com". Protocols, domains, and ports must match.

So we went to CORS whitelist, and added https://*.visual.force.com as an entry. But this still did not fix the issue. Anyone else come across this?

  • Hi, Have you tried using top.location.reload(); instead of parent.
    – manjit5190
    Commented Feb 2, 2016 at 19:35
  • Yes, same error
    – hamayoun
    Commented Feb 2, 2016 at 19:40
  • Depending on what your embedded VF page is doing, another option is to use the pattern shown here: salesforce.stackexchange.com/questions/37036/…
    – Mark Pond
    Commented Feb 5, 2016 at 1:28
  • Well, you got further than I have. I created a VF page that contains only <h2>Hello</h2> and all I see is an empty (blank) section on the page and a bunch of blocked origin messages in the console log.
    – tggagne
    Commented Jun 9, 2016 at 16:54

1 Answer 1


Looks like there's no workround for the CORS issue, so solution is to solve it by using HTML "form" and "action" to refresh parent page, as per this article.


You must log in to answer this question.

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