<?xml version="1.0" encoding="UTF-8" ?>
<dt-option group="callback">
	<name>stateLoadCallback</name>
	<summary>Callback that defines where and how a saved state should be loaded.</summary>
	<since>1.10</since>

	<type type="function">
		<signature>stateLoadCallback( settings )</signature>
		<parameter type="DataTables.Settings" name="settings">
			DataTables settings object
		</parameter>
		<returns type="object">
			Data retrieved from storage containing the saved state (from `dt-init stateSaveCallback`)
		</returns>
		<scope>HTML table element</scope>
	</type>

	<description>
		With this callback you can define where, and how, the state of a table is loaded from. By default DataTables will load from `localStorage` but you might wish to use a server-side database or cookies as your implementation requirements demand. For the format of the data that is stored, please refer to the `dt-init stateSaveCallback` documentation.

		Note that this callback works hand-in-hand with `dt-init stateSaveCallback`. This callback loads the state from storage when the table is reloaded while `dt-init stateSaveCallback` saves it.
	</description>

	<example title="Load state from a server via Sjax"><![CDATA[
$('#example').dataTable( {
  "stateSave": true,
  "stateLoadCallback": function (settings) {
    var o;

    // Send an Ajax request to the server to get the data. Note that
    // this is a synchronous request since the data is expected back from the
    // function
    $.ajax( {
      "url": "/state_load",
      "async": false,
      "dataType": "json",
      "success": function (json) {
        o = json;
      }
    } );

    return o;
  }
} );
]]></example>

	<related type="api">state()</related>
	<related type="api">state.clear()</related>
	<related type="api">state.loaded()</related>
	<related type="api">state.save()</related>
	<related type="option">stateSave</related>
	<related type="option">stateSaveCallback</related>
	<related type="option">stateLoadParams</related>
	<related type="option">stateLoaded</related>
	<related type="option">stateSaveParams</related>
	<related type="event">stateLoaded</related>
	<related type="event">stateLoadParams</related>
	<related type="event">stateSaveParams</related>
</dt-option>