@GPI Thanks for the help provided it was really helpful. Also want to share the below link from which i get started. Seems like, it has different functionality with different browser. See the scenario mentioned below :
I made some changes in java code to set the HTTP Content-Disposition header field.
String user_agent = request.getHeader("user-agent");
boolean isInternetExplorer = (user_agent.indexOf("MSIE") > -1);
if (isInternetExplorer) {
response.setHeader("Content-disposition", "attachment; filename=\"" + URLEncoder.encode(templateName+".cft", "utf-8") + "\"");
} else {
response.addHeader("Content-Disposition", "attachment; " +"filename=\"" + MimeUtility.encodeWord(templateName+".cft", "utf-8", "Q") + "\"");
}
But the above code is still not working for Safari 5.1.7 browser.
The above code works well on the following browsers :
- Firefox (Version 30.0)
- Chrome (Version 36.0.1985)
- IE (Version 8.0)
What if the user access the page on IE < 8 and same for other browsers.