Posted: August 18, 2011 Comments(2)


This is genius. It’s one of those things I slap my forehead and wonder why I hadn’t thought of it. Spinners built completely out of JavaScript, created and destroyed only when you need them.

I thought for a second about it, and when are we all using spinners? Usually it’s when JavaScript is doing some work, waiting for a request to complete the circle, loading assets, something. We want visual feedback so a small spinning gif is popped in and we’re good to go. But we have to append the img node to the DOM (or have our CSS class set up to handle it), make sure it’s positioned properly, and then either remove it or the class that gave it life.

spin.js seems like a much cleaner solution to me. ajaxload.info will be missed.

Get my newsletter

Receive periodic updates right in the mail!

  • This field is for validation purposes and should be left unchanged.


  1. I also was happy to see spin.js when I first saw it. Then I looked at my CPU meter. It was taking up 23% of my CPU.

    The thread on hacker news likewise has similar findings of very very high CPU usage.

    In addition, the minimized spin.js is 1.7k vs about 600 bytes for an animated spinner GIF.

    I really do applaud the author of spin.js, it’s a great website and looks nicely done, but it’s not practical for actual, production use, at this time, in my opinion.

Leave a Reply

Your email address will not be published. Required fields are marked *