Filedownload in IE causes error

asked 2011-06-30 01:03:15 +0800

sensdb gravatar image sensdb
21 2

Hi there!

When i use the Filedownload.save(...) method in my application using the MS IE an error occurs when i invoke the method a second time.
It works fine if i use another browser, but on IE it's working only once.

The error is a brwoser message popping up with content like

x.pdf could not be downloaded.
the internet site could not be opened...

i read somewhere setting a "no-cache" attribute in the http response header can help, but i don't get access to it. can anyone help?

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-08-03 02:37:06 +0800

sensdb gravatar image sensdb
21 2

does no one else have the same problem? this issue is really annoying!


link publish delete flag offensive edit

answered 2011-08-03 07:47:14 +0800

sensdb gravatar image sensdb
21 2

updated 2011-08-03 07:47:41 +0800

finally i found an answer i guess.
Due to Link
IE version 6 - 8 cache internet sites automatically for any reason.

I built a filter (implementation of javax.servlet.Filter) in the web.xml, where i edited the response in the doFilter method like

HttpServletResponse httpResponse = (HttpServletResponse) response;
httpResponse.setHeader("Pragma", " ");
httpResponse.setHeader("Cache-Control"," ");

Now it works!

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2011-06-30 01:03:15 +0800

Seen: 489 times

Last updated: Aug 03 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More