We have JSF web application that generates XLS file and gives user link to thes file.
All works fine if access this file via HTTP.
But IE(8) cannot open/save this xls file via HTTPS.
There is following error message:
Internet Explorer cannot download ...466088C5C313F92808BDB0AFF3447 from testhost.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
I can open the same document via HTTPS in Firefox and in Chrome.
What can be the problem with IE?
Headers:
HTTP/1.1 200 OK
Date: Fri, 18 Jun 2010 14:45:42 GMT
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1
X-UA-Compatible: IE=EmulateIE7
Last-Modified: Fri, 18 Jun 2010 14:45:11 GMT
Cache-control: max-age=0, no-store, no-cache
Pragma: no-cache
Expires: 0
Content-Type: application/vnd.ms-excel
Content-Length: 6656
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
According to http://support.microsoft.com/kb/316431 , you should remove any of these HTTP headers you use:
Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate
Most likely cause is the http response headers, which we had to configure specifically for xls files under ssl
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Fri, 18 Jun 2010 16:22:07 GMT
Cache-Control: cache, must-revalidate
Pragma: public
for the cache control and
Content-Type: application/vnd.ms-excel
Content-Disposition: attachment; filename="ExcelDownload.xls"
Content-Transfer-Encoding: binary
Content-Length: <fileSize>
for the content
The key entry is Pragma: public
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With