JavaScript Loading Screen while page loads

You can wait until the body is ready:  Run code snippetExpand snippet Here is a JSFiddle that demonstrates this technique. Update Here is a modern version using promises. The promise is completely optional now, as it is only used for a delay. The DOMContentLoaded event will fire once the page is loaded.