Vladimir Mitev 26.Jul.11 08:03 AM a Web browser Applications development 8.5.1 All Platforms
I'm integrating Sametime chat into a web application using the STProxy API. The web application can be opened in multiple tabs and each tab will be running a chat client.
In order to login the loginByToken method is used.
When opening two tabs in Firefox everything is working fine. Only the first tab is sending requests to pull the current status:
and all tabs receive the chat messages.
When opening two tabs in Chrome from a link from the first tab ("Open link in new tab") again everything is working.
However when opening an empty new tab in Chrome and then navigating to the web application the following occurs:
1) A popup flashes on the screen
2) Each tab starts opening requests to the STProxy
3) Some messages are received in the first and others in the second tab
When investigating the issue I saw that upon login in the second tab the following function is called stproxy.getHeadUpdater().
It tries to open the first tab and read its stproxy object. However although the headUpdaterWindowName cookie is correct the old tab could not be reached thus a popup flashes and the current tab becomes the headupdater. Which on the other hand messes somehow the first tab.
The reason for this behavior seems to be in the fact that when a new empty tab is opened in Chrome it is started in a separate process. When a tab is opened from a link it is started in the old process. In order to check this assumption I stared Chrome with the option --process-per-site and all worked fine.
Still this seems more of a work-around rather than a real fix.
Please share your thoughts. Is there a way to fix the client or the only solution is the STProxy API to be fixed?