Skip to content
SyncProxy javascript client with support for all major embedded databases (IndexedDB, SQLite, WebSQL...)
JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


SyncProxy-client is a javascript client for SyncProxy that enables one-single line of code implementation of synchronization for javascript offline applications using embedded database (IndexedDB, SQL Lite, WebSQL...). Used with the SyncProxy server ( to access the backend database (MySQL, SQL Server, MongoDB...), this is the shortest way to make mobile offline applications synchronize bi-directionally in realtime using reactive sync technology.


$ git clone


Simply copy the library, then load the SyncProxy client script from within your main index.html page:

<script src="sync-client/sync-client.js" proxyID="<proxy Id>" connectorType="IndexedDB or WebSQL or SQLite or IonicStorage" dbName="your client db name"></script> 

(the script params can also be retrieved directly from when creating a sync proxy)

Custom params

Sync client script can be invoked with custom params that are inserted as attributes of the <script> tag:

src (mandatory)
path to the client sync script (recommended: "client-sync/client-sync.js")

proxyID (mandatory)
Id attributed by SyncProxy to your proxy on creation

values: "IndexedDB", "WebSQL", "SQLite", "LocalStorage", "IonicStorage"
default: "IndexedDB"

Name of your embedded database in mobile app.
default: "SyncProxy"

values: "ws" (websocket) or "wss" (secured websoket)
default: "wss"

Url of the server hosting SyncProxy
default: ""

Port listened on by SyncProxy server
default value: 4501

values: "true", "false" If true, the embedded database's structure will be automatically upgraded (if this is relevant to the type of database) during sync after a database schema update. Set to false if application creates and upgrades database schema by itself.
default: "true"

values: "true", "false" If true, sync client will be started automatically. If false, sync client should be created by calling SyncClient.initClient(params)
default: "true"

values: "true", "false" If true, enables reactive sync. Reactivity for each table + direction (server->client and client->server) is configured on server side
default: "true"

values: "true", "false" If true, a popup sync button is displayed. If false, application must take care to launch sync by itself
default: "true"

When using Auto Backendless database or NoSQL database without server database schema, you have the ability to discover schema from client's data. In that case, attribute tablesToSync must be set with the list of tables to sync from client to server. default: ""

If set, defines a custom credential function. Typically returns a {login, password} object which will be sent as-is to the server. If left blank, the credentials are managed by sync client using a login prompt.
default: ""

If set, defines a user login source object within the application, for instance: "document.getElementById('inputLogin').value"
default: ""

If set, defines a user password source object within the application, for instance: "document.getElementById('inputPassword').value"
default: ""

Message that will popup in the app before the first synchronization.
default: "To begin, please press Sync button"

utcDates If true (default), all datetimes will be stored as ISO-8601 strings, otherwise as "YYYY-MM-DD HH:MI:SS" (without timezone information). default: "true"

Handler function called each time synchronization ends


Like us, test your mobile and progressive web apps with


Read our tutorial on how to setup SyncProxy client with an Ionic hybrid mobile application

You can’t perform that action at this time.