PWA API
Last updated 10/04/2026
Five Offline API (PWA) Overview
Five provides a set of client-side offline APIs available on the
All functions are executed in the browser (PWA/ custom action context) and are not available on the backend. They provide the core building blocks for offline-first behavior in Five applications, including table initialization, record and dataset storage, data retrieval, deletion, and online status monitoring.
Together, these APIs allow Five applications to maintain functionality without connectivity and seamlessly synchronize once the user is back online.
Offline API Functions
initializeRequiredTables()
The
initializeRequiredTables(tables: Array<string>, done: () => void): any;
saveTableOffline()
The
saveTableOffline(tableName: string, data: Array<any>) : void;
getTableOffline()
The
getTableOffline(tableName: string, callback: (data: Array<any>) => void, errorCallback?: (err: any) => void) : void;
saveRecordOffline()
The
saveRecordOffline(tableName: string, key: string, data: Object, onSaved?: () => void, errorCallback?: (err: any) => void) : void;
getRecordOffline()
The
getRecordOffline(tableName: string, key:string, callback: (data: any[]) => void, errorCallback?: (err: any) => void):void;
deleteRecordOffline()
The
deleteRecordOffline(tableName: string, key: string, onDeleted?: () => void, errorCallback?: (err: any) => void) : void;
registerOnlineStatusCallback()
The
registerOnlineStatusCallback(callback: (online: boolean) => void): () => void;