I run into issue what ie7 doesn't support blob data type.
And now i can't force browser(ie7) to load file which i pass from server with get request.
Modern browsers(chrome, firefox) do it well with this js code
var xhr = new XMLHttpRequest();
xhr.open('GET', COEFF_CONTROL_GET_CSV_FILE_URL + "&" + "DWL_PERIOD=2019&DWL_MR=37", true);
xhr.onreadystatechange = function(){
if(xhr.readyState == 4 && xhr.status == 200){
//Code below implements file load
var contentDisposition = xhr.getResponseHeader('content-disposition');
var filename = contentDisposition.split("filename=")[1].split(";")[0];
var blob = new Blob([xhr.response], {type: 'text/csv'});
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = filename;
document.body.appendChild(link);
link.click();
}
}
Headers that i pass with my request from server for now
header("Content-Type", "text/csv;charset=utf-8");
header("Content-Disposition", "attachment;filename=&mvFileName");
I tried already(but it did't help)
Will be appreciate for all possible help!