{hero}

serverSide

Since: DataTables 1.10

Feature control DataTables' server-side processing mode.

Description

DataTables has two fundamental modes of operation:

  • Client-side processing - where filtering, paging and sorting calculations are all performed in the web-browser.

  • Server-side processing - where filtering, paging and sorting calculations are all performed by a server.

By default DataTables operates in client-side processing mode, but can be switched to server-side processing mode using this option. Server-side processing is useful when working with large data sets (typically >50'000 records) as it means a database engine can be used to perform the sorting etc calculations - operations that modern database engines are highly optimised for, allowing use of DataTables with massive data sets (millions of rows).

When operating in server-side processing mode, DataTables will send parameters to the server indicating what data it needs (what page, what filters are applied etc), and also expects certain parameters back in order that it has all the information required to display the table. The client-server communication protocol DataTables uses is detailed in the DataTables documentation.

Type

This option can be given in the following type(s):

Default

false

Example

Enable server-side processing:

new DataTable('#myTable', {
	serverSide: true,
	ajax: 'xhr.php'
});

Related

The following options are directly related and may also be useful in your application development.