Internet Explorer Fails to open PDF file

Occasionally, Internet Explore fails to open PDF file using Adobe Acrobat Reader and displays a blank screen.

 

In the network monitor trace, it shows that client side receives the PDF file from server and logs Http 200.

 

From process monitor log, it shows the Internet Explorer fails to open pdf documents due to the file didn’t save in the local cache directory. Hence, the pdf file cannot be opened.

 

We noticed following difference after comparing good and bad scenarios network monitor trace captured on client sides:

 

It shows Cache- Cache-Control: no-cache="set-cookie" headers was included in Responses in bad scenarios.

For example,

 

Bad scenario:

 

- Http: Response, HTTP/1.1, Status: Ok, URL: /web/downloadDoc/file1.pdf ProtocolVersion: HTTP/1.1 StatusCode: 200, Ok Reason: OK Date: Tue, 31 May 2011 23:23:54 GMT Server: This server is configured to not send version information Cache-Control: max-age=60 Cache-Control: no-cache="set-cookie" Pragma: public ContentLength: 7162 Expires: [time, date] GMT Content-Disposition: inline; filename="file1.pdf" Set-Cookie: JSESSIONID=[ JSESSIONID]; path=/ ETag: "1306884234113" XPoweredBy: Servlet/2.4 JSP/2.0 Keep-Alive: timeout=62, max=46 Connection: Keep-Alive - ContentType: application/pdf MediaType: application/pdf Content-Language: en HeaderEnd: CRLF - payload: HttpContentType = application/pdf HTTPPayloadLine: %PDF-1.4

Good scenario:

 

- Http: Response, HTTP/1.1, Status: Ok, URL: /web/downloadDoc/file2.pdf ProtocolVersion: HTTP/1.1 StatusCode: 200, Ok Reason: OK Date: Wed, 01 Jun 2011 00:02:23 GMT Server: This server is configured to not send version information Cache-Control: max-age=60 Pragma: public ContentLength: 8569 Expires: [time, date] GMT Content-Disposition: inline; filename="file2.pdf" ETag: "1306886543935" XPoweredBy: Servlet/2.4 JSP/2.0 Keep-Alive: timeout=62, max=44 Connection: Keep-Alive - ContentType: application/pdf MediaType: application/pdf Content-Language: en HeaderEnd: CRLF - payload: HttpContentType = application/pdf HTTPPayloadLine: %PDF-1.4

The direct cause of this issue is that the server returns a “no-cache” HTTP header. 

IEtreat Cache-Control:no - cache=”set-cookie” as Cache-Control:no - cache. There is no explanation on no - cache=”set-cookie” the HTTP 1.1 RFC.

The result is IE will temporary create the file in cache folder and when IE’s refer count on the file is 0, the file will be deleted.  

When problem happens:

 IEcreate the temp file in cache folder. IE call API CreateProcess to launch acrobat reader, and ask the application to load the pdf file in the cache. IE delete the pdf file in cache because refer counter is 0. Acrobat reader tried to open the pdf file, but it cannot find the file, so error reported. Further checked found that web server added “no-cache” HTTP header randomly. Developer revised code to stop adding the HTTP header ‘Cache-Control:no-cache=”set-cookie”’ at server side to resolve this issue.

 

Regards,

Anik from APGC DSI Team