I am using jquery file download ..
the code is as follows :
function downloadFile(){
var downloadOptions = {
preparingMessageHtml: \"We are preparing y
On sucess;
response.setHeader("Set-Cookie", "fileDownload=true; path=/");
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
On error
response.setHeader("Set-Cookie", "fileDownload=false; path=/");
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
Use "Cache-Control" only if will exists anothers requests.