2

Say you've got an app that can send out POST requests every time an action happens. It allows subscriptions to add/drop quickly and effortlessly.

Say that site is Stackoverflow and it can send a you POST notification every time a new question is asked. Would there be any way to consume notifications like this in browser?

I imagine a case when you spend > 5 min on a page you start to get notifications if it's updated since your last page refresh. I understand how you could do this via long polling but I am wondering if there's any way to hook into these server-to-client POST requests (vs. repeated GET client-to-server requests) from a browser and let data be pushed to you instead.

buley
  • 28,032
  • 17
  • 85
  • 106

2 Answers2

5

For pushing you could take a look at HTML5 WebSocket API.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928
1

How about a lightweight web server on the client like Jetty?

MikeAinOz
  • 126
  • 1
  • 10
  • 24