Hi,
I have a script which prompts user to download a file. The code looks like this
header("Pragma: public");
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-length: ".filesize("$filepath));
header("Content-type: $mime");
header('Content-Transfer-Encoding: binary');
header('Content-Disposition: attachment; filename="'.$some_name.'"');
readfile($filename);
exit(0);
With this script download dialog box appears and we can download or save files from browser. But when the file is being download, the site hangs i.e. no other pages can be navigated. Site just stays on the similar page. If anyone has idea on this, please let me know.
Thank you
Open New page when downloading is on progress
Moderator: General Moderators
Re: Open New page when downloading is on progress
Have you confirmed the issue is not with the browser itself?
Re: Open New page when downloading is on progress
i have tried it with firefox, safari, chrome and IE6. It works fine with IE6. By the way how can i confirm it is the problem of browsers?
Re: Open New page when downloading is on progress
i went through the link but could not find any clue for my problem. please help me to resolve the problem. I just the need to open all other pages of the website while download on my site is on progress
Re: Open New page when downloading is on progress
You'll need to read it again, carefully. It explains exactly what is happening.
Re: Open New page when downloading is on progress
Sorry but i could not get anything from that link. Please have a look at the code above, if there is any problem, let me know. And if there are any other issue besides code, suggest me what to do next