Open Bokeh application in different browser tab?

I am running a bokeh application with different tabs. I love to open same application in different browsers. So I can use different application tabs in different monitors. For now, I can only connect one browser at a time. I am using

tabs = Tabs(tabs = [tab0,tab1])
curdoc().add_root(tabs)

for opening the application. And runs with

bokeh serve myapp.py

How can I use bokeh client or anything?? Any working example??

1 Like

This is fairly contrary to the intended usage, so it is not a situation that is catered to. It is possible to pass a &bokeh-session-id= parameter in the URL to connect to an already existing session. Doing this will afford “shared google doc” kind of behavior where two viewers are connected to the same document.

But some caveats:

  • We only really use this for testing purposes. It’s not officially supported to use two viewers at the same time (no promises it will work well for your actual usage).

  • You’ll have to get the session id somehow. Either by initiating a session programmatically with pull_session, or by opening a session with a browser and copying the session ID out of the Bokeh server console logs.