I have a php script which records an impression then displays an image.
// Determine which header to send.
$parts = explode('.', $tool->filename);
header("Content-Type: image/{$parts[1]}");
readfile('files/'.$tool->filename);
For some reason Firefox is getting the file twice. Here is the log.
00:00:01.268 0.023 1211 182 GET 200 image/png http://localhost/ap/image.php?aid=1&t=6
00:00:01.347 0.162 1185 182 GET 200 image/png http://localhost/ap/image.php?aid=1&t=6
You can see they are got a split second apart. If I change the script as follows.
// Determine which header to send.
$parts = explode('.', $tool->filename);
//header("Content-Type: image/{$parts[1]}");
//readfile('files/'.$tool->filename);
echo 1;
Then the browser only reads the file once. Does anyone know why this is?
For testing purposes try starting your firefox from a console via
to temporarily disable all extension. Maybe one of the extensions is causing this.