Implementing a download header typically requires server-side scripting to modify the HTTP response before it reaches the client. 1. PHP Implementation
You can also set these headers globally or for specific file types directly in your server configuration: download header
php $filename = $_GET['file']; // required for IE, otherwise Content-disposition is ignored if(ini_get('zlib.output_compression')) Stack Overflow // required for IE
In PHP, the header() function is used to send raw HTTP headers. This must be called any other output is sent to the browser. download header
Understanding the "Download Header": A Guide to HTTP Content-Disposition
Use Header set Content-Disposition "attachment" within a directive. Best Practices for File Downloads