I have a site (running Apache and PHP) that allows users to download JPEGs. The user clicks once on a link to download the JPEG, the same as when you download a zip file (not using right-click save-as).
The PHP script that handles the download add these headers:
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=download.jpg');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file_final));
Opera users, with the Opera Turbo feature switched on, are having a problem.
Instead of getting the JPEGs, they get files that have been compressed by Opera's server. (I think they are WebP images, they begin with RIFFÞÃ WEBPVP8
). They appear the same in the browser, but when user downloads them to their desktop, they can't use them.
How can I configure my web server to prevent Opera Turbo from compressing JPEGs? Is there a HTTP header I can send?
0 Answers