---
url: https://talkjs.com/docs/Features/Security/Browser_Synchronization/
title: "Browser synchronization | Security | TalkJS Docs"
---

For AI agents: Find a documentation index at https://talkjs.com/llms.txt (full content at https://talkjs.com/llms-full.txt). Get a markdown version of any page by appending .md to its URL path.

# Browser synchronization

Control whether user and conversation data sync from the browser.

By default, TalkJS allows you to create and update users and conversations in your frontend code with the JavaScript SDK. The changes you make are then synchronized with the TalkJS backend.

If you exclusively use the [REST API](https://talkjs.com/docs/REST_API/) to create or update TalkJS users or conversations, you may want to disable synchronization for users, conversations or both.

## How to disable browser synchronization

In the **Security settings** section of the **Settings** tab of the TalkJS [dashboard](https://talkjs.com/dashboard/), uncheck the checkboxes for synchronizing users, conversations or both:

![Disable synchronization in the TalkJS dashboard](https://talkjs.com/docs/disallow_sync.png)

## User synchronization

If user synchronization in the browser is turned on, the JavaScript Data API lets you create or update a user by calling [`UserRef.set` or `UserRef.createIfNotExists`](https://talkjs.com/docs/JavaScript_Data_API/Users/#UserRef__set):

```javascript
await session.user('<USER_ID>').set({
  name: 'Alice',
  email: 'alice@example.com',
});
```

The user will then be synchronized with the TalkJS backend.

If user synchronization in the browser is turned off, the user will not be synchronized and `.set` will return a rejected promise. You can still call [`UserRef.get`](https://talkjs.com/docs/JavaScript_Data_API/Users/#UserRef__get) and [`UserRef.subscribe`](https://talkjs.com/docs/JavaScript_Data_API/Users/#UserRef__subscribe) when user synchronization is disabled.

## Conversation synchronization

If conversation synchronization in the browser is turned on, the JavaScript Data API lets you create and update conversations with the [`ConversationRef.set`](https://talkjs.com/docs/JavaScript_Data_API/Conversations/#ConversationRef__set), [`ConversationRef.createIfNotExists`](https://talkjs.com/docs/JavaScript_Data_API/Conversations/#ConversationRef__createIfNotExists) and [`ConversationRef.participant`](https://talkjs.com/docs/JavaScript_Data_API/Conversations/#ConversationRef__participant) methods.

If conversation synchronization in the browser is turned off, you can read data about existing conversations with [`ConversationRef.get`](https://talkjs.com/docs/JavaScript_Data_API/Conversations/#ConversationRef__get) and [`ConversationRef.subscribe`](https://talkjs.com/docs/JavaScript_Data_API/Conversations/#ConversationRef__subscribe) but you cannot edit conversation details or add/remove participants. Attempting to edit the conversation will return a rejected promise.

Conversation synchronization does not affect the ability to send and edit messages.

## Further reading

See the tutorial on [how to ban a user from all chats](https://talkjs.com/resources/how-to-ban-users-from-all-chats-with-talkjs/) for an example of how to use [Authentication (Identity verification)](https://talkjs.com/docs/Features/Security/Authentication/) together with disabling browser synchronization, to ensure the integrity of your user's data.
