---
schema_version: "1"
id: 51a0e6edd4c4aa1f4f901cc5f019bc572db12b1ce37fa0361440cea269558944
title: Configuring a JavaScript Remoting Request
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/javascript/pages-js-remoting-configuring-request.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-js-remoting-configuring-request.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 899f77e84de64361df5a9fb24d957d948357d1445a00a47ec09339b8b6422913
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# Configuring a JavaScript Remoting Request

Configure a remoting request by providing an object with configuration settings when you declare the remoting request.

For example, the default configuration parameters look like this:

```visualforce
{ buffer: true, escape: true, timeout: 30000 }
```

These configuration parameters aren’t ordered, and you can omit parameters you don’t want to change from the default.

JavaScript remoting supports the following configuration parameters:

|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).|

The request timeout can also be configured for all requests made by a page, by setting the timeout using the Visualforce remoting object:

```javascript
<script type="text/javascript">

    Visualforce.remoting.timeout = 120000; // Set timeout at page level

    function getRemoteAccount() {
        var accountName = document.getElementById('acctSearch').value;

        // This remoting call will use the page's timeout value
        Visualforce.remoting.Manager.invokeAction(
            '{!$RemoteAction.AccountRemoter.getAccount}',
            accountName, 
            handleResult
        );
    }

    function handleResult(result, event) { ... }
</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.

