リンクがクリックされたときに (window.open を使用して) 新しいブラウザー ウィンドウを開く Web アプリがあります。ウィンドウが最初に開いたとき、ウィンドウは空のままです。呼び出しはレポート ジェネレーターに対するもので、これは PDF ドキュメントを返します。
リンクをもう一度クリックするか、新しいウィンドウを更新すると、正しいコンテンツが表示されます。
これは、実稼働サーバーの IE (私は IE8 を使用しています) でのみ発生し、テスト サーバーでは発生しません。
HttpAnalyser を使用してトラフィックをチェックしましたが、さまざまなシナリオ間の違いを見つけることができません。
ここにスクリプトがあります
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');
なぜこれが起こっているのでしょうか?それを防ぐにはどうすればよいですか?
ありがとう!
アップデート
リクエストはこちら
GET /webapps/birt/run
?__title=MMS%20Report
&__report=Report/emosBuildStaffGrouped.rptdesign
&__lc=en
&__format=pdf
&__runtime=prod
&MmsFairId=25
&Language=en
&Inland=false
これが応答です
HTTP/1.1 200 OK
Date: Mon, 16 Jul 2012 12:30:31 GMT
Server: IBM_HTTP_Server
Content-Disposition: inline; filename="emosBuildStaffGrouped.pdf"
Set-Cookie: JSESSIONID=xxxxxxxxxxxxx:-1; Path=/
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Cache-Control: no-cache="set-cookie, set-cookie2"
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/pdf
Content-Language: de-DE
私の目を引いたのは、奇妙な Expires 値です。1994年?!? それがどこから来ているのかわかりません。ページを更新すると、Set-Cookie も Expires も受信されません....