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.
It shows Cache- Cache-Control: no-cache="set-cookie" headers was included in Responses in bad scenarios.
- Http: Response, HTTP/1.1, Status: Ok, URL: /web/downloadDoc/file1.pdf
- Http: Response, HTTP/1.1, Status: Ok, URL: /web/downloadDoc/file2.pdf
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.
Anik from APGC DSI Team