As opposed to generating a new masthead imageset every visit, I decided to generate image files every hour.
This will result in less server load, but more importantly, will fix the first-visit race condition I was seeing in most browsers.
Before, the CSS file was spawning a request for the main random image and each of the four image slices. I’m guessing that the requests for the slices were finishing before the request for the main random image could be fulfilled. All of these were serving up header type image/jpg data, rather than writing their data to disk and then serving.
Either way, it was a mess.
Now, every visit prompts a look-see at a touch-file, and if the touch-file’s last modified date is more than an hour ago, new actual image files are generated into a directory on the server.
Now if I could only get the left part of the masthead to stick to the bottom… (edit – fixed.)