Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Configuring a JavaScript Remoting Request
1{ buffer: true, escape: true, timeout: 30000 }| Name | Data Type | Description |
|---|---|---|
| buffer | Boolean | Whether to group requests executed close to each other in time into a single request.
The default is true. JavaScript remoting optimizes requests that are executed close to each other in time and groups the calls into a single request. This buffering improve the efficiency of the overall request-and-response cycle, but sometimes it’s useful to ensure all requests execute independently. |
| escape | Boolean | Whether to escape the Apex method’s response. The default is true. |
| timeout | Integer | The timeout for the request, in milliseconds. The default is 30,000 (30 seconds). The maximum is 120,000 (120 seconds, or 2 minutes). |
1<script type="text/javascript">
2
3 Visualforce.remoting.timeout = 120000; // Set timeout at page level
4
5 function getRemoteAccount() {
6 var accountName = document.getElementById('acctSearch').value;
7
8 // This remoting call will use the page's timeout value
9 Visualforce.remoting.Manager.invokeAction(
10 '{!$RemoteAction.AccountRemoter.getAccount}',
11 accountName,
12 handleResult
13 );
14 }
15
16 function handleResult(result, event) { ... }
17</script>Override a page-level timeout configuration on a per-request basis by setting the timeout in the configuration object for that request, as described above.