$.get( url: downloadUrl, function(data) { //after get the data, how to ask browser pop up to save file? } );
the data is the content flushed by the server-side servlet. may be binary
Do not use Ajax for this, just location = downloadUrl;
location = downloadUrl;