How to prevent Internet Explorer from unzipping jar files -


When I upload a jar file to my web server, people who use Firefox or Opera can download it there is no problem. But when the link is downloaded with Internet Explorer, IE opens the contents of the jar instead of downloading it. Is there any way to prevent IE from doing so?

I also had to face this problem (unexpected) solution to keep a query string at the end of the URL .

Obviously, Internet Explorer is not paying attention to any other relevant information from the mime type, content-type header, or HTTP response. Instead, it is looking at the URL, seeing that it ends in ".jar" and behaves as a result in a particular way. (! @ # $ !!) Fortunately, if the URL does not end with ".jar", then the unzipping feature is going away.

Adding a query string URL will now ".jar" A query string will work, and your website may ignore the query string.

Then download URL, and finally attach "? J" for example:

and Internet Explorer Your file will download properly.


Comments