top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is optimal way to communicate with the web server while fetching the images, using javascript?

+3 votes
362 views

I went through this Discussion:

http://stackoverflow.com/questions/7087036/fetching-images-from-server-while-drawing-the-cell

I have a web server server-1.example.com. There is a JSON-Server running on another server server-2.example.com. What I have to achieve is to fetch a list of URLs (in form of JSON response) from server-2 and loop through the urls and fetch them from the server-1. In the meantime i have to animate these images on the browser by Fading the images one after the another.

The algorithm is something like this:-

START:
   FETCH the URLs from server-1 and store them in a cache C
   Loop until C.length
      Fetch first K images by forking a thread.
      animate k images
 END

How can I optimize K? Is my approach right?

posted Mar 29, 2015 by Prakash

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
What is C i.e. C.length?

Similar Questions
+2 votes

I need to create a charts.I wonder is it possible to create a chart in html5.Sorry am new to html5.If possible mean explain with example. Thx.

...