//File Object return in ajax Success in data variable
var blob = new Blob([data]);
if (navigator.appVersion.toString().indexOf('.NET') > 0) //For IE
{
window.navigator.msSaveOrOpenBlob(blob, "filename.ext");
}
else if (navigator.userAgent.toLowerCase().indexOf('firefox') >-1)
{
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = "filename.ext";
document.body.appendChild(link);//For FireFox <a> tag event
//not working
link.click();
}
else
{
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = "filename.ext"
link.click();
}