This page loads 3 unoptimized images (done on purpose of this demo). An overlay is shown on the site until all images have completed loading (or failed because of errors).
Once every image has been handled in some way, we reveal the site to the user.
Additionally, if the preloading takes too long, we quit the preloaderscreen and show the user what's on the page already.
Doesn't matter if the images have loaded. Showing something is better than showing nothing.
How about that? ;)
You can download the source files here. Enjoy.