jQuery – Refresh IFRAME

If the iframe was not on a different domain, you could do something like this:


But since the iframe is on a different domain, you will be denied access to the iframe’scontentDocument property by the same-origin policy.

But you can hackishly force the cross-domain iframe to reload if your code is running on the iframe’s parent page, by setting it’s src attribute to itself. Like this:

// hackishly force iframe to reload
var iframe = document.getElementById(FrameId);
iframe.src = iframe.src;