Make the Tablekit library to sort with current sort order after page refresh

My table columns are sorted by the Tablekit library (millstream.com.au/upload/code/tablekit/).
The user can click the columns to toggle the sort order either ascendingly or descendingly.
I can save the current sort order (preference) in the server.
After the page is refreshed, the web page is sorted by the original sort order.
How to make the Tablekit library to sort with the current sort order after page refresh?
My web page column is:
<th class=“sortfirstdesc” id=“urgency” onClick=“reverseOrder($sortdesc)”>ID</th>

I looked at the documentation and it seems like sort() is the method you should manually call on a TableKit object

To ensure my program keep the client preference after page refresh, do
I do this:

var value = Cookie.get('key'); 
if (value == null) { 
    // get  the client preference 
    // ... 
    // save  the client preference 
    Cookie.set('key', 'uservalue'); 
} 

// use the client preference