IE8 does not show PDF files when using HTTPS

luca 08/11/2013 0

In the last few days, I faced a strange problem during my job: a web application, running on Tomcat, dynamically generates some PDF reports.

When we activated the HTTPS to secure the connection, users with Internet Explorer 8 were no longer able to display those PDF files: Adobe Reader was correctly started but the browser‘s window remained blank.

The problem wasn’t appearing with Internet Explorer 9 or with different browsers (Firefox, Chrome…).

After some investigation, we found that the problem was caused by two HTTP headers that forced the browser not to save the page into the cache:

First, being the application balanced by a F5 LTM appliance, I wrote an iRule to remove those headers:

if { [HTTP::header Content-Type] equals "application/pdf" } {
    HTTP::header remove "Cache-Control"  
    HTTP::header remove "Pragma" 

Then, our DEV team developed a Tomcat Filter, that – if Internet Explorer 8 is detected from the user-agent field – removes the headers using a custom ServletResponse.

Leave A Response »

This website uses cookies to ensure you get the best experience on our website maggiori informazioni

Questo sito utilizza i cookie per fonire la migliore esperienza di navigazione possibile. Continuando a utilizzare questo sito senza modificare le impostazioni dei cookie o clicchi su "Accetta" permetti al loro utilizzo.