JavaScript / Web Advanced
Add custom content and offline recovery, and migrate from the old UniApp SDK after basic messaging works.
Complete the Quickstart, then add only the advanced capabilities your product needs.
Custom Messages
Define product content, assign a type number, and register it before connecting.
Offline Recovery & UniApp Migration
Connect message synchronization and move away from the unmaintained UniApp SDK.
Before production
- Use
wss://and verify certificates, reverse-proxy WebSocket Upgrade, and CSP. - Some console output in
1.3.5is not controlled byconfig.debugand can contain decoded message data. Apply an approved removal or redaction approach and inspect the final bundle. - Keep tokens in memory or controlled session storage; exclude them from URLs, analytics, error reporting, and browser logs.
- Test network loss, sleeping tabs, expired tokens, kicks, offline deduplication, account switching, and rollback.