getJSON not working for large data

前端 未结 4 562
遥遥无期
遥遥无期 2020-12-22 00:13

In one of my website I am using $.getJSON(url, function (data) this is not working if the response data is more that 1000. Any alternate is there?

4条回答
  •  囚心锁ツ
    2020-12-22 00:41

    There are no size restriction in $.getJSON. Either you have problem on the server or you have timeout problems. $.getJSON is just a short form of $.ajax. Try to use $.ajax with the timeout parameter with the local timeout (in milliseconds) for the request (see http://api.jquery.com/jQuery.ajax/ for more information).

提交回复
热议问题