[Answered ]-Ajax: Simultaneous loading of multiple images

1👍

Since the ajax calls are blocking as said by chrisdpratt, if you really need to display the images at the same time I would advise some kind of preloading of the 3×3 grid of images and when required by the code you can display them.

With this in mind you can run the code you already have on $(document).ready() but make the images hidden (ie display:none). When later required you would just change the display attribute on the images you need to display.

👤vascop

1👍

If the issue you were seeing was indeed caused by the single-threaded implementation of the Django development server, you might try django-devserver (https://github.com/dcramer/django-devserver). Amongst other improvements, it boasts:

“An improved runserver allowing you to process requests simultaneously.”

The other improvements make it worth it, too!

Leave a comment