Why is new IE popup window initially empty but filled after F5 (refresh)?
===

I have a web app which opens a new browser window (using window.open) when a link is clicked. The very first time the window is opened it remains empty. The call is to a report generator and this returns a PDF document.

If the link is clicked a second time or if the new window is refreshed then the correct content is displayed.

This is only happening in IE (I'm using IE8) on the production server but not on the test server.

I have used HttpAnalyser to check the traffic and I cannot spot any differences between the different scenarios.

Here is the script

	var url = "http://myserver/webapps/birt/run?__title=MMS Report&__report=Report/" + report + "&__lc=en&__format=pdf&__runtime=prod&";
	var chk = document.getElementById('chkPageBreak');
	if(chk && chk.checked) url += "PageBreak=true&";
	if(params) {
		params = params.replace('%MMSFAIRID%', '25');
		params = params.replace('%LANGUAGE%', 'en');
	}
	url += params;
	birturl = url;
	birtwin = window.open(url,'MMSBIRT', 'menubar=0,location=0,toolbar=0,resizable=1,status=1,scrollbars=1');

Why might this be happening? What can I do to prevent it?

Thanks!