How do I keep the page on a fake loading state via javascript?

I have a page that I set to $('body').hide() until it finishes loading a AJAX request, after that the page is set to $('body').show(). In the meantime (about 2 seconds) the page stays blank and the browser icon stops loading, then it shows the content or redirect to another page (according to the returned AJAX variables). 

There's any way to make the browser stay on a loading state even it isn't loading anything? Just to seems like it's still loading stuff.

I've already tried to create something like:

```
while(page_loading())
    var l = 1;

```

But then the browser crashes. How can I force this "fake" state?

EDIT:

Sorry, I forgot to mention before: I want to keep the page blank as usual without any loading gif or anything like that but forcing the browser to be on a loading state. When the browser is loading a page there's an loading icon that keeps appearing on the browser tab or a message on statusbar. I know these particular states can't be change on directly with javascript so I thought that there's a way to keep the browser on this loading state using some infinite looping HTML request, or something like that. If I set "cursor: wait" the browser tab still changes to a "finish state".