First of all to analyze the reasons for the timeout:
1. The network is not smooth.
2. Background running slower (the first time the server is running, easy to appear)
Timeout Result: Timeout set request timeout in JQ.
Enter error (Error handling) If the server response time exceeds the time set
When extjs makes an Ajax request, the default time is 30 seconds. If the data query time exceeds 30 seconds, extjs reports an error.
In this case, you need to modify the extjs timeout time:
Two methods:
1: add the :( Timeout: 100000000) attribute during Ajax requests.
Ext.
Ext. ajax. timeout, ext. ajax. request
The company has a small product that uses ext's ajax function. Later, when the data volume is large, query timeout is always reported. After analysis, it is caused by the default timeout sett
When doing web development, when the session expires, if it is not an AJAX request, it is easy to jump to the specified page. But there are problems with Ajax requests. When the session expires, clicking on the AJAX request will pop up some page source files. First, an interceptor was built to determine the session timeout
How does ajax set timeout (an action is executed twice)? ajaxaction
Today, during the test project, we found that an action was executed twice. This operation took about five minutes to complete. The project environment was apache2 + tomcat6.0.
Several timeout settings have been found during online search:
1. Set the ajax
We use jquery's Ajax, time-out retries can be in two ways, one is to configure the Ajax timeout parameter, and the other is implemented in the way of the settimeout timer:1) Timeout parameter configuration methodvarXHR =$.ajax ({type:' Get ', URL:' Http://localhost:8080/user
Recently, EXtjs was used as a project. When loading a large amount of data, loading times out. In FB, it turns out that ext's default ajax request is 30 seconds.Find the following solution on the Internet for your reference and other people's reference.When ExtJS makes an Ajax request, the default time is 30 seconds. If the data query time exceeds 30 seconds, ExtJS reports an error.In this case, you need to
In Java Web Development, when the session timeout, the normal page of the jump good processing. The request for Ajax timeout processing, you need special treatment.
First write a unified filter, or interceptor, for the AJAX request filtering process, the following example to filter for example:
public void Dofilter
1) sessionvalidatefilter checks whether the session times out.2) check whether the request is an Ajax request in sessionvalidatefilter.3) When an Ajax request session times out, a JSON {"statuscode": "301", "message": "Session Timeout! is returned! Please re-sign in! "}
4) The dwz JS framework is based on statuscode = 301. The processing is to jump to the login p
jquery Ajax Timeout settings var ajaxtimeouttest = $.ajax ({ URL: ",//URL of the request timeout:1000,//time-out setting, unit millisecondsType: ' Get ',//request method, Get or postData: {},//Request parameters, JSON formatDataType: ' json ',//Return data formatSuccess:function (data) {//Request successful callback
Ext. ajax. timeout
The company has a small product that uses ext's ajax function. Later, when the data volume is large, query timeout is always reported. After analysis, it is caused by the default timeout setting. Later, it adds a sentence to the jsp page.
Ext.
From: http://www.jb51.net/article/43770.htmIf it is an Ajax commit, the jump command from the server will not work, so if it is a session timeout, and is in the AJAX request, in the response header, and then a global method to handle the session timeout to jump page.Write the following method in the filter: (not tested
Usually when the Ajax access server, from the sending request to establish a connection, to the server processing and return the data time is not too long, depending on the server set session time. Once the server is processing data slowly and may time out, the AJAX client will need special handling to handle the response. Example:$.ajax ({URL: "Export-base!getzi
var ajaxtimeouttest = $.ajax ({URL: ",//URL of the requesttimeout:1000,//time-out setting, unit millisecondsType: ' Get ',//request method, Get or postData: {},//Request parameters, JSON formatDataType: ' json ',//Return data formatSuccess:function (data) {//Request successful callback functionAlert ("Success");},Complete:function (xmlhttprequest,status) {//Final execution parameters after request completionif (status== '
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.