I have a Perspective project that I started using Messaging to populate text on a title bar. The message and error handling scopes are both set to page . I noticed that when I have 2 browser windows open, the title bar text in both browser window changes when a message is fired in one window.
I am using:
Chrome: Version 113.0.5672.64 (Official Build) (64-bit)
Is this normal or is there a way to prevent the cross talk from browser to browser?
Show your code. But note that this is expected/intended for session-scoped messages.
You probably need to switch to page-scoped messages.
Hmm. You are using page scope. Or think you are. You might want to add some logging to your event scripts.
Without looking at the code which invokes the
sendMessage call and the accompanying configurations on the listeners we won't be able to hep much.
On the message handler I notice you are setting
self.session.custom.appbarText is there a possibility this is what is causing the text to change on both windows in your session?
I think you found it. So both browsers are using the same session data
Yes, because they are both the same session; all pages open within a singular browser register as belonging to the same session. Pages opened in different browsers will register as a different session.
I fixed it by writing directly to the text field. Its good now.
The odd thing is is that the pages were in 2 separate browsers that I opened independently.
But were they both Chrome, or both Firefox?
The session management and cookies and all that stuff are all stored at the application level, so all browsers you open for Chrome all share the same data on the back-end of the application. It doesn't matter if they're separate windows - they're the same application. Incognito/private browsers have their own memory in use and so register as different sessions.
They were both Chrome.
What you said about sessions makes sense. Looks like I am good to go. Thanks for your help.