Reputation: 2036
Is there any way to measure and keep track of the progress of downloading a large JSON file using getJSON, or something similar if that can't do it. at the moment, since getJSON has basically only a success callback, i don't know what's going on until the json is done downloading. (upwards of a minute)
if it helps, this will be part of a standalone chrome app and a phonegap app
Upvotes: 1
Views: 558
Reputation: 2036
I ended up following a guide at https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest and using XMLHTTPRequests instead of getJSON
I also had to use some rack middleware on the ruby on rails side to include content-length in the HTTP response for JSON
Upvotes: 1