While queries run in the client's browser, data is not processed as part of the document or UI thread.
This puts it into a middle ground as an alternative to server-side processing.
The benefits are low-latency, offline browsing support, reduced server load, and it maintains high performance as data is stored/processed outside of the document DOM.
This is a working sample that should be adapted to individual need.
Firefox on Mac OS seems to take issue with IndexedDB
<sortable-table pageSize="10"> <indexeddb-ajax role="datasource" url="./fruits.json" dbVersion="48"></indexeddb-ajax> </sortable-table>
Data is loading = {{loading}}
<indexeddb-ajax url=[string] dbName=[optional string] dbStoreName=[optional string] dbVersion=[string] start=[int] length=[int] sortColumn=[string] sortDescending=[boolean] columns='[ {"name":"name"}, {"name":"energy"}, {"name":"protein"}, {"name":"fat"}, {"name":"carbohydrates"} ]' ></indexeddb-ajax>
Waiting for Query
Start
Paging first record indicator. This is the start point in the current data set (0 index based - i.e. 0 is the first record).
Length
Number of records that the table can display in the current draw. It is expected that the number of records returned will be equal to this number, unless the server has fewer records to return. Note that this can be -1 to indicate that all records should be returned (although that negates any benefits of server-side processing!)
Sort Column
Descending
Column by which to sort the records.
Loading
{{dataSize}} Total Records
{{data.length}} Records Returned