I have problem with mozilla firefox in this case. I am generating file on the fly and then trying to download the file and then delete it from the server. Problem is, Firefox says the file doesnt exists, even though I can see it is generated on the server. Chrome and Opera works perfectly.
firefox version: 58.0.2
Any ides what has to be tuned for firefox ?
header('location: /path/'.$name.'.pptx');
header('Content-Disposition: attachment; filename="' .basename($name).'.pptx"');
ob_start();
flush();
sleep(5);
unlink($name.'.pptx');