Some pages require an inordinate amount of time to load. For most sites, this is a big problem. Webmasters and SEO specialists know the value of a quick landing page load, because they know that netizens have short attention spans.
Dynamically built webpages, (especially applications), require time to load and visual feedback that something is happening. The most famous example is the gmail loading page:
Gmail uses a more sophisticated progress bar to represent the loading of the webpage. I found an article on yensDesign that gives some great advice on how to do this, if you want to get really fancy.
If you have a dynamically built page that you’d like to give a loading message to that doesn’t require a full progress bar, I recommend simply displaying a message and an animated gif.
The Method
The trick to accomplishing this is a small mix of JavaScript and CSS. You don’t have to be using <div>’s to display your content, but you should. My example uses <div>’s. Continue reading Display a Simple Loading Message and Animated Loading Gif Using JavaScript