Tutorial :Dummy AJAX calls to force a “wait” cursor. Bad idea?


I would like the user's cursor to be in "wait-state" during certain actions, but the problems with using the CSS cursor property is forcing me to search for more... creative solutions. (The problem I'm referring to, is that the cursor doesn't change until the user moves the cursor. See, for example: How to get cursor to change before mouse moves when changing the cursor style dynamically.)

I've found however, that most browsers seem to correctly switch back and forth through wait and default cursor when making AJAX requests. So now I was thinking do a dummy AJAX requests for as long as I want the cursor to be in "wait". I feel that this might be a Very Bad Idea, but I can't really point out why. Any good reasons why this is bad? (Or much better solutions?)


Yes, it is a bad idea. A waiting cursor may make the user think his browser (or connection) is frozen.

Web pages give you plenty of options for waiting feedback: progress bars, spinners, feedback text, modal feedback windows, disabling commands... use one (or more) of those instead.


its a bad idea because it increases load and traffic on the server.


I found a possible solution myself. (This is more for future users who come across this problem, really, since I've since come to agree that using the cursor for feedback is A Bad Idea in general.)
I found that if the first change of the cursor is in an eventhandler of a mouse-event (like "click", or "move"), not only will the cursor change immediately, it will also change immediately again if changed at a later time with setTimeout or setInterval, given that setInterval or setTimeout were also called within that eventhandler.
Yes, weird.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »