views:

82

answers:

1

If you have total control of both ends of the wire (client and server), why do people suggest using Comet or HTTP long polling? I understand when you only have a browser as it can only communicate over HTTP.

People say you need to do this to beat firewalls because port 80 will be open. But why not just communicate directly over port 80 without using HTTP? What am I missing?

+2  A: 

Sometimes an HTTP proxy will be running on port 80. This will only permit HTTP traffic and block/discard FTP or other TCP traffic.

Update: A proxy is a server between a client and server. It can appear to be almost transparent to the casual user, but on closer inspection of traffic you can find evidence of it. There are different types of proxy which can handle different types of traffic. HTTP proxies are popular for anonimization of traffic, control of HTTP access on corporate networks, and to improve performance through caching.

BrianLy
What is an HTTP proxy? It redirects port 80 traffic to other servers by protocol? So if it isn't HTTP then it will throw it on the floor?
DevDevDev
Also where might this proxy live that it will introduce this problem? If it isn't on the server side.
DevDevDev
It will live between the user's desk and the Internet. Your question presupposes you control both the client and server. Do you also (and will you always) control the stuff in between?
timdev
+1, it's all about keeping expected information on expected ports. It can also be firewalls - some firewalls inspect the data coming across specific ports to see if any of it could be malicious. Non-http data would almost certainly be discarded.
jvenema