I make vast use of CSS sprites and background images in general - all via CSS.
Now, using Firebug's network panel I see that the loading of these CSS background images starts only after these steps:
1) loading and parsing of the HTML document
2) loading the CSS files
Which looks like this: http://www.umdiewelt.de/tmp/network_withoutIMG.JPG
So I included the following to see what happens:
<img src="http://cdn.umdiewelt.de/images/layout/c_bgBody.jpg" style="display:none" />
<img src="http://cdn.umdiewelt.de/images/layout/c_bgHeader.jpg" style="display:none" />
<img src="http://cdn.umdiewelt.de/images/c_miscSpriteScreenBasic.png" style="display:none" />
Note, that the images are set to display:none.
Now these downloads start earlier: http://www.umdiewelt.de/tmp/network_withIMG.JPG
Is this good coding practice or just crap? It's certainly an overhead of unused HTML, but is it a valid way to preload CSS sprites?