I’ve been displaying a random image at the top of this page for some time now. The image is changed each time the page is reloaded. Inititially this was implemented using client-side javascript, which had 2 problems.
The first was that folks who had javascript turned off didn’t see the images. The second was that the list of almost 2000 images was downloaded as part of the javascript, adding 250Kb to the size of this page.
I am now using server-side php to implement the random image functionality. I have also added a random quote feature. I reused the image display code w/very little modification (really the work was in creating the quotes file from various web sources and then getting it in the right format) and now each time one reloads the page both a new quote and a new image are displayed.