Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First off, I assume we're talking about async requests that don't lock up the browser.</p> <p>Second off, it really depends upon the performance profile of the server responsible for serving that request and what the response time distribution looks like for successful requests/responses.</p> <p>If successful requests can be completed in anywhere from a few milliseconds to several minutes depending upon the type of request or the server load, then you may as well let the timeout be at least as long as a successful request could take (allow the user the option of waiting for a successful request to complete). If you are worried about the user getting impatient, then add a cancel or stop button after 10 seconds if the request doesn't complete quickly so an impatient user can bail, but a patient user can wait for it to complete.</p> <p>If, on the other hand, you know from studying the server or from experience that if the request hasn't completed in 15 seconds, then it's highly unlikely that it's going to complete successfully, then there's really no point in setting the timeout longer than that.</p> <p>Third off, it also depends upon how important the ajax call is and how it fits in with the user interaction. If it's an optional background operation (perhaps an autocompletion match request), you can give up much sooner and just schedule the next request for some time in the future. If it's a direct user action (like a Save button), then you really ought to try hard to let the request complete successfully and give it a much longer time.</p> <p>To summarize, you should consider these factors:</p> <ol> <li><p>Is the ajax request optional in the background (like auto-complete) or a specific user action (like save or load)?</p></li> <li><p>What is the longest time that the server might take for a successful ajax response? You should give the patient user the ability to wait at least that long for the request to succeed.</p></li> <li><p>Are you offering the impatient user the ability to cancel a long running request? If so, you can let the request go longer.</p></li> <li><p>If you have no idea how responsive the server is, then you should probably let it run at least 120 seconds since some servers might take that long, but you should consider offering the impatient user the ability to abort the request and go about their other business.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload