开发者

jquery ajax failed with large data [closed]

开发者 https://www.devze.com 2023-02-01 06:12 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_JAVA技巧 Closed 12 years ago.

Passing huge ammount of data from jquery ajax is failed,is there any way to reolve this issue.I given type as POST.Thanks in Advance.

Regards, Raju


This is how i step through an ajax request to debug it and it works most of the time.

(edit: i've changed this answer slightly because i assumed OP was using PHP)

First

Check to see if the browser is throwing you any errors. You can do so by checking out FireBug (firefox extension) OR in the webkit dev tools (I prefer chrome dev tools). This is the first and most obvious error you can make (syntax).

Next

Given your description it's evident your script is timing out, but just to be safe utilize the $.ajax() success callback to see what your response is. Make sure you are posting the expected data appropriately.

Check for Server Side errors

Make sure everything is good to go in the script you are executing via ajax.

Finally...

It's likely your request is timing out due to the large amount of data and the time it takes to process/send it back. Try specifying the timeout in jQuery.

You can do so via the $.ajaxSetup() api if you'd like it to apply to all of your ajax requests.

OR

Where you are making the actual request.

EX:

$.ajax({
  //set a timeout for 10 seconds
  timeout: 10000
});


After reading jquery userguide,i understood that it wont allow query string if url length is more than 2020,IIS server simply discard it as per Microsoft.

I send data as key value pairs instaed of passing data as query string.

I dont understand what are down votes,i clearly mentioned in my query type as post,large data passing as query string.

Thanks once again to all of you giving answers.

0

精彩评论

暂无评论...
验证码 换一张
取 消