aspnet-401911-components-rich-text-editor-client-server-synchronization.md
The ASPxRichEdit control maintains the logical structure of a document in a document model. This model is sent to the client when the control loads a document. The model then exists on the client and server. The control synchronizes changes made on the client with the server.
Synchronization occurs every 5 seconds or instantly if the control executes an urgent command (for instance, the document is saved). During the pending period, the ASPxRichEdit control places non-urgent commands in a queue. The server can temporarily hold an outdated document model before the changes are synchronized (before the 5 seconds timeout is over).
During the synchronization process, the control sends a request with commands (maximum 250) to the server and waits for a response for up to 30 seconds.
The requestSettings property allows you to change the default synchronization settings. The following properties are available:
| Property | Default Value | Description |
|---|---|---|
| pendingPeriod | 5 | Specifies the pending period before the control sends a request to the server (in seconds). |
| maxCommandCount | 250 | Specifies the maximum number of commands that the control can send in one request. |
| responseWaitingTime | 30 | Specifies the time the control waits for a response before it sends a request again (in seconds). |
richEdit.requestSettings.maxCommandCount = 100;
richEdit.requestSettings.responseWaitingTime = 10000;
richEdit.requestSettings.pendingPeriod = 3000;
Execute the forceSyncWithServer command to force instant synchronization.
richEdit.commands.forceSyncWithServer.execute(function ()=> console.log("Models are equivalent"))