I am trying to force-reload the contents of an iframe (force-reload meaning the browser cache should not be used). From the soltuion Reload an iframe with jQuery here, I can do this via this javascript code:
document.getElementById(FrameID).contentDocument.location.reload(true);
But I am hitting the same-origin policy error. But I did enable CORS on both, the page that has the iframe embedded and the page that is loaded within the iframe. From the web development tools I have verified that on both loads, the CORS header is present:
Access-Control-Allow-Origin: *
Although both sides are under different domains, I control both of them and can send the CORS header or any other header, if required.
Whats the correct way of doing this?