javascript - Downloading HTML files without opening a browser -


i have url don't want open in browser. servlet url points able download jpeg image of rendered html document using html2canvas library based on specific params.

how can download html jpeg without rendering html on client side. possible. please share inputs.

you can try this:-

response.addheader("content-disposition", "attachment; filename=" + name); 

or ian suggested:-

content-disposition: attachment; filename=abc.jpeg 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -