I have a document that looks like:
<iframe source="http://example.com/" style="width:100%; height:100%"></iframe>
<form action="//example.com/foo" method="post">
<input type="hidden" name="foo" value="bar">
</form>
<script>
$(function(){
$('form').submit();
});
</script>
The concept is to show the content of the iframe while the form is submitting, as and interstitial step.
The problem is, the browser aborts the request to the iframe source when the form is submitted, so even when the form submission takes a while, the iframe remains blank.
I found up that deferring the form submission in 50ms does the job, but it feels hacky.
Any ideas why it wouldn't load and what is the proper way to override it?