download attribute of html is not working for iphone browser

I am trying to force download pdf instead of opening. I have used

<a href='path' download>

but its still open file in mobile devices like iphone I need to force to download file instead of open Thanks in advance


Im giving you a idea for force downloading through php,

Create a PHP file download.php, change accordingly to your php app.

// Ajmal Praveen
    $file_name = 'file.pdf';
    $file_url = '' . $file_name;
    header('Content-Type: application/octet-stream');
    header("Content-Transfer-Encoding: Binary"); 
    header("Content-disposition: attachment; filename="".$file_name."""); 

Make a link

<a href="./download.php?file=file.pdf" download>Download</a>

Source: stackoverflow