Can I use SyncedStore solely between tabs in one browser? (No signaling servers)
See original GitHub issueIt seems like it’s possible to use SyncedStore in multiple tabs in a browser, just locally. Just BroadcastChannel and y-indexeddb
, no signaling servers, and I don’t think it would need any WebRTC activity.
I can share some code I’ve tried but first I just wanted to ask the question… Is there an official way to use it purely locally?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
4 Ways to Communicate Across Browser Tabs in Realtime
You can use this feature to communicate across Browser Tabs, where other Tabs will receive the event once the storage is updated.
Read more >Sync providers - Javascript CRDT based real-time sync
Communication over the signaling servers can be encrypted by providing a shared secret, keeping the connection information and the shared document private.
Read more >JavaScript: sharing data between tabs - Stack Overflow
However, this means the data will only be accessible on the first page load of each tab. If you already have two tabs...
Read more >Sharing state between browser tabs with Redux. - Dave Rivera
For this specific case we will try two different approaches, one by using no libraries you'll be guided through the process you have...
Read more >yjs/yjs: Shared data types for building collaborative software
Communication over the signaling servers can be encrypted by providing a shared secret, keeping the connection information and the shared document private. y- ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @hangtwenty.
Broadcastchannel (cross tabs) and WebRTC syncing can both be managed using y-webrtc.
I think it should be possible to disable the webrtc part in y-webrtc, and use only the broadcastchannel. Could you try to pass an empty array as signaling servers? e.g.:
(see https://github.com/yjs/y-webrtc/blob/c059b8679e72e4a2cd59189b022a25edbd07cbeb/src/y-webrtc.js#L545)
Glad to hear!