I run Ruby threads that use PhantomJS, a command-line headless Webkit engine, to turn a number of urls into images. As of now, the page loads only once all of the images have been generated. Instead, I want to load the page and have a loading animation while the images are generated and show them as they are generated without the user having to reload the page. How would I do this? (I assume AJAX is needed.)I run Ruby threads that use PhantomJS, a comman