SOLVED, due to a bootstrap known issue (Nesting <a> inside <button> doesn't work in Firefox).
I'm trying to simply force a download of a file and it works fine on Chrome & Safari, but not on Firefox.
I've download.php file to download my file (used in a "a href"):
<?php
$filename="myFile.pdf";
$file="../content/$filename";
$len = filesize($file); // Calculate File Size
if (ob_get_contents()) ob_end_clean();
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Description: File Transfer");
header("Content-Type:application/pdf"); // Send type of file
$header="Content-Disposition: attachment; filename=$filename;"; // Send File Name
header($header );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".$len); // Send File Size
@readfile($file);
exit;
?>
It's used with :
<a class="myFileClass" href="download.php">Download</a>
So with Chrome & Safari, when I click on the download link, the file is downloaded ! But with Firefox, nothing happens.
Any idea of this curious issue ?
Thanks by advance.