internet explorer - download file code fails in IE8 but works in IE9 -
i trying create xls file through java code , allow user doownload it. download code in jsp , works in ie9 , other browsers. give error in ie 8 "unable dowload file. unable open internet site.the requested site either unavailable or can not found.please try later."
my jsp code follows.
<%@ page import="org.apache.poi.ss.usermodel.workbook"%><%@ page import="java.io.*"%> <%response.setheader("pragma","no-cache"); response.setheader("content-disposition", "attachment;filename=datatemplate.xls"); response.setcontenttype("application/vnd.ms-excel"); outputstream os = response.getoutputstream(); ((workbook)request.getattribute("result")).write(os); os.flush();os.close();%>
i checked settings ie suggested microsoft sites. suggestions other users on internet re-install ie8 not sound me getting issue on multiple machines.
any welcome.
thanks.
this issue occurs if server sends "cache-control:no-store
" header or sends "cache-control:no-cache
" header.
one of solution add cache-control: private
response header.
also, there few official blog on microsoft support. check these links 1 of them should solve problem.
Comments
Post a Comment