Clear Chat History After Page Refresh
How can i clear the chat history when the chat is closed and revisited ?
-
Hi Pius John
Thanks for reaching out!
Could clarify your use-case in a bit more detail? I.e are you wanting to clear the chat history when the widget is closed, or when the chat session is ended completely?
Look forward to hearing from you!
Tipene
-
Yes thanks for reaching out Tipene Hughes
i want to clear the chat or cache when the user session has ended. i.e When the use logs out of the application.
-
Hi Pius,
Something like this might be what you're looking for:
zE("webWidget:on", "chat:end", () => { zE("webWidget", "logout"); });
This will clear the user session when the chat has been ended. Here's a couple of links which go in to a bit more detail:
I hope this helps! Feel free to reach out with any questions.
Tipene
Please sign in to leave a comment.
3 Comments