This error was the main problem for my site: http://worldofsolitaire.com
I worked on this for a long time, using a conditional rule in the .htaccess file, which will disable ALL image caching on the site for Firefox users. It was a terrible thing to do, but at that time I could not track the error in Firefox, and the site was a bit slower than showing duplicate / corrupted images.
When I read the related error that it was fixed in recent versions of Firefox, I changed the condition on April 19, 2009 (yesterday) to disable caching for Firefox 2 users.
After a few hours, I received more than 10 letters from users of Firefox 3 (confirmed) that they saw duplicate images. Therefore, this issue is a STILL issue in Firefox 3.
I decided to create a simple Linux testing program that would allow me to check the URL to see if they generate the same cache cache keys.
To compile on any Linux system: g ++ -o ffgenhash ffgenhash.cpp
Here is the code (save to ffgenhash.cpp file)
#include <stdio.h> #include <string.h> #include <stdlib.h> #define ULONG_MAX 0xFFFFFFFF #define PR_ROTATE_LEFT32(a, bits) (((a) << (bits)) | ((a) >> (32 - (bits)))) unsigned long ffgenhash(const char * key) { unsigned long h=0; for(const unsigned char * s = (unsigned char *) key; *s != '\0'; ++s) { h = PR_ROTATE_LEFT32(h, 4) ^ *s; } return (h==0 ? ULONG_MAX : h); } int main(int argc, char ** argv) { printf("%d\n", ffgenhash(argv[1])); return 0; }
As you can see, here are two real URLs that generate the same cache cache key:
./ffgenhash "http://worldofsolitaire.com/decks/paris/5/12c.png" 1087949033 ./ffgenhash "http://worldofsolitaire.com/decks/paris/5/13s.png" 1087949033
Since I preload these images into a Javascript loop, trying to use some kind of empty <script> tag is not possible to work around here.
Indeed, I believe that the only real solution is to change the URL for Firefox users in some way to create a unique cache key. So the approach that I will use.
By the way, I will be tempted to create a Firebug add-on that will check all the resources downloaded by the site and give a big mistake if the two resources on the site have a common hash key, so that the developer knows. It would be great to launch sites like Google maps, as I have seen strange things with these images over the past few years :)