For large applications it is often needed to have a splash screen that is shown while pre-loading the required resources in the background. It is especially needed when the application should run from the web with a low connection speed.
Typically the splash screen should show a static image or simple animation. At the same time it should pre-load and cache all resources which are required to run the application. This well-defined task does not need a lot code to run and thus should be written as efficient as possible to avoid long load times for the splash screen itself.
This article is about writing small splash screen / pre-loader code, which can be used upfront any of your application.