I do this:
$.get('/BSS/clients/printBillsJson.action', $.extend({date: date}, filterData), function(response) { var blob=new Blob([response]); var link=document.createElement('a'); link.href=window.URL.createObjectURL(blob); link.download="Docs.pdf"; console.log("blob: ", blob); console.log("link: ", link); link.click(); }); p response header:
Content-Disposition attachment;filename="docs.pdf" Content-Type application/pdf Date Wed, 23 Dec 2015 15:01:24 GMT Server Apache-Coyote/1.1 Transfer-Encoding chunked In chrome offers to save the file (and I would like it to open), the fox does not work at all. I always did this through links, but in this case it’s not convenient, tell me, please, where to dig?