Why does the next warning appear in Google Chrome when downloading a file from the server? Web server - Apache
Resource interpreted as Document but transferred with MIME type application/vnd.openxmlformats-officedocument.wordprocessingml.document PHP:
$file = "uploads/demo.docx"; //text/html; charset=UTF-8 - С этим заголовком предупреждений нету header ("Content-Type: application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document; charset=UTF-8"); header ("Accept-Ranges: bytes"); header ("Content-Length: ".filesize($file)); header ("Content-Disposition: attachment; filename=demo.docx"); readfile($file); Even if we just point the file path via HTML
<a href="http://server/uploads/demo.docx">Скачать</a> then we still get the same warning.