html - IE8 and Safari open .csv file in browser. How do I make it so it opens a download option? -


I am trying to create a jsp page that allows a user to download a .csv file. It is fine on FF, Chrome and IE10, that is, it opens a popup so that the user can be given the option to download / save the file. But the CSV file in IE8 and Safari is open in the browser. How do I make it work. I have the code

onclick = "window.location.href = '.. / sample / sample csv'; return back;; />

Thank you in advance

An alternative would be to link to a real download page. Pushed down as a response with a content-type of application / octet-stream ; To do this, you may have to type servlet: < p> As a side note, my first project Instinct response.write () was out of the document, but apparently.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -