Guide
Chat history & returning visitors
When a visitor comes back to your website, the chat widget reopens their previous conversation and reloads earlier messages — so they can pick up right where they left off.
How returning visitors are remembered
For an anonymous visitor, the widget stores an ID in their browser. The next time they open chat in the same browser, Sonny uses that ID to find their conversation and load its messages automatically — no sign-in required.
- Anonymous visitors stay browser-scoped
- Sonny saves the visitor session in the browser where the chat started. Returning to the same website in that browser brings the previous conversations back automatically.
- Retry a failed load
- If conversation history does not load, the widget shows a Try again button. Select it before refreshing the page or starting a new conversation.
When previous messages don't show up
Because anonymous history lives in the visitor's browser, it won't appear in a few situations:
- A different browser or device
- History is tied to the browser it was started in. Opening the same site in a different browser, on a phone vs a laptop, or in a private/incognito window starts a fresh conversation.
- Cleared browsing data
- If the visitor clears site data, the widget can no longer recognize that browser session and previous messages won't load.
- A site that clears data on logout
- Some websites clear browser data when a user logs out. When that happens, the widget starts a fresh visitor session the next time they return.
Verified customers continue across devices
If your website has customer logins, visitor identification can verify the signed-in customer with a server-signed JWT. After Sonny confirms that proof, the widget loads that customer's conversations across browsers and devices, and preloads their latest active chat without marking it read. Older conversations remain in the history list.
Verified identity also lets the AI safely use that customer's saved details, look back at an earlier chat when the customer refers to it, and learn a durable preference or fact from a verified message. Browser-supplied email, name, and custom attributes still provide context only; they never unlock another customer's history or memory.
Related docs
- Visitor identification
Identify logged-in users and send custom attributes from your website.
- Widget setup
Install the Sonny live chat widget on your website with a single script tag.
- Widget customization
Match the widget to your brand with colors, logos, messages, and behavior.
- Contacts
Learn how contacts are created, managed, tagged, and merged in Sonny.