admin管理员组

文章数量:1022695

Both SSE (Server Sent events) and Websockets allow real-time messaging from a server to a client.

Do these stream protocol work when the browser is in the background and another programs are in focus, especially in mobile browsers?

Both SSE (Server Sent events) and Websockets allow real-time messaging from a server to a client.

Do these stream protocol work when the browser is in the background and another programs are in focus, especially in mobile browsers?

Share Improve this question asked Mar 19, 2014 at 12:03 Adam MatanAdam Matan 137k155 gold badges412 silver badges580 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

Yes. At least WebSocket.

Open this demo in browser 1, click on "open 2nd instance", copy the link to browser 2, put browser 1 to background and click "publish" in browser 2.

The demo will work on Chrome for Mobile (on Android) also. I have just tested: it'll receive messages a) when switching to another tab, and then switch back, and also b) if you open another activity (app), and then return to Chrome.

You can also try the other demos. Other than audio output with the "beatbox demo", everything will work on Chrome Mobile. Note that with the "beatbox demo", you can still use the smartphone as a controller .. it's just the audio output which has issues.

Disclaimer: I am original author of Crossbar.io and work for Tavendo.

Not on all platforms. According to Keep WebSocket alive in Mobile Safari it is not possible in mobile safari.

Both SSE (Server Sent events) and Websockets allow real-time messaging from a server to a client.

Do these stream protocol work when the browser is in the background and another programs are in focus, especially in mobile browsers?

Both SSE (Server Sent events) and Websockets allow real-time messaging from a server to a client.

Do these stream protocol work when the browser is in the background and another programs are in focus, especially in mobile browsers?

Share Improve this question asked Mar 19, 2014 at 12:03 Adam MatanAdam Matan 137k155 gold badges412 silver badges580 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

Yes. At least WebSocket.

Open this demo in browser 1, click on "open 2nd instance", copy the link to browser 2, put browser 1 to background and click "publish" in browser 2.

The demo will work on Chrome for Mobile (on Android) also. I have just tested: it'll receive messages a) when switching to another tab, and then switch back, and also b) if you open another activity (app), and then return to Chrome.

You can also try the other demos. Other than audio output with the "beatbox demo", everything will work on Chrome Mobile. Note that with the "beatbox demo", you can still use the smartphone as a controller .. it's just the audio output which has issues.

Disclaimer: I am original author of Crossbar.io and work for Tavendo.

Not on all platforms. According to Keep WebSocket alive in Mobile Safari it is not possible in mobile safari.

本文标签: javascriptDo SSE and Websockets work when the browser is in the backgroundStack Overflow