1

I'd like to know how can I make the little web page icon on the left from the title "running" when I do, for example, a getJSON() to my external server to warn the user that his/her request is being treated.

Is there a way to control it?

Teun Zengerink
  • 4,277
  • 5
  • 30
  • 32
Thomas Saldi
  • 91
  • 1
  • 2
  • 9

1 Answers1

3

Put a favicon link on the header of your page, e.g.

<link id="favicon" rel="icon" type="image/gif" href="/base-favicon.gif" />

when an ajax call starts, just change the href attribute of your favicon. Prepare an animated gif, then make a substitution with

document.getElementById('favicon').href = "/animated-favicon.gif";

when your ajax call has been executed (success or error) just restore the previous favicon

Fabrizio Calderan
  • 120,726
  • 26
  • 164
  • 177