1

I'm writing a simple XMPP chat application. The interface has been made minimal to accommodate mobile devices. The client uses strophe.js which utilizes a bi-directional persistent connection (BOSH) between the javascript application and XMPP server.

Would this persistent connection consume a lot of bandwidth? I know most mobile phone users have some sort of monthly data quota - I don't want to hog it.

Devon
  • 11
  • 2

1 Answers1

0

Yes, if you do the math, you need to account for:

  1. HTTP headers sent & received
  2. Possible cookies to/from the server
  3. BOSH typically sends a packet every minute both ways (called the empty body). This takes up considerable bandwidth.

You might want to consider using websockets instead.

http://blog.superfeedr.com/xmpp-over-websockets/

Is there an open source WebSockets (JavaScript) XMPP library?

The XEP (draft): https://datatracker.ietf.org/doc/html/draft-moffitt-xmpp-over-websocket-00

Community
  • 1
  • 1
dhruvbird
  • 6,061
  • 6
  • 34
  • 39