JavaScript Remoting Limits and Considerations

Although JavaScript remoting isn’t subject to some resource limits, it does come with limits of its own.

JavaScript remoting isn’t a way to avoid Salesforce service limits. JavaScript remoting calls aren’t subject to API limits, but Visualforce pages that use JavaScript remoting are subject to all standard Visualforce limits.

By default, the response of the remote call must return within 30 seconds, after which the call will time out. If your request needs longer to complete, configure a longer timeout, up to 120 seconds.

The response of the remote call has a maximum size of 15 MB. If your JavaScript remoting code is exceeding this limit, you have several options:
  • Reduce the size of the response for each request. Only return data that’s required.
  • Break up large data retrieval into requests that return smaller chunks.
  • Make batched requests more frequently, reducing the size of each individual batch.
  • Use non-batched requests. Set { buffer: false } in your remoting request configuration block.
Previous
Next