DataTables example - Pipelining data to reduce Ajax calls for paging

Sever-side processing can be quite hard on your server, since it makes an Ajax call to the server for every draw request that is made. On heavy load sides, you could potentially end up DDoSing your own server with your own applications!

This example shows one technique to reduce the number of Ajax calls that are made to the server by caching more data than is needed for each draw. This is done by intercepting the Ajax call and routing it through a data cache, using the data from the cache is available, and making the Ajax request if not. This intercept of the Ajax request is performed by giving the ajax option as a function. This function then performs the logic of deciding if another Ajax call is needed, or if data from the cache can be used.

Keep in mind that this caching is for paging only; the pipeline must be cleared for other interactions such as sorting and filtering since the full data set, when using server-side processing, is only available at the server.

Name Age Position Office Start date Salary
Name Age Position Office Start date Salary

Basic Init

Advanced Init

Styling

Data Sources

Ajax

Server Side

Api

Plug-ins