Comet (programming): Difference between revisions

Content deleted Content added
MarciS (talk | contribs)
m Alternatives: Fix supported browsers
Monkbot (talk | contribs)
m Task 16: replaced (3×) / removed (0×) deprecated |dead-url= and |deadurl= with |url-status=;
Line 55:
|date = 2005-11-01
|accessdate = 2008-05-06
|deadurlurl-status = yesdead
|archiveurl = https://web.archive.org/web/20060208041559/http://www.obviously.com/tech_tips/slow_load_technique
|archivedate = 2006-02-08
|df =
}}
</ref> The term ''Comet'' is not an acronym, but was coined by Alex Russell in his 2006 [[blog]] post ''Comet: Low Latency Data for the Browser''.<ref>{{cite web
Line 73 ⟶ 72:
 
===Early Java applets===
The ability to embed [[Java applet]]s into browsers (starting with Netscape 2.0 in March 1996<ref>{{cite web |url=http://www27.netscape.com/comprod/products/navigator/version_2.0/index.html |title=Netscape.com |accessdate=2017-08-16 |deadurlurl-status=bot: unknown |archiveurl=https://web.archive.org/web/19961115203505/http://www27.netscape.com/comprod/products/navigator/version_2.0/index.html |archivedate=November 15, 1996 |df= }}</ref>) made two-way sustained communications possible, using a raw [[Transmission Control Protocol|TCP]] socket<ref>[http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html "java.net.Socket (Java 2 Platform SE v1.4.2)"] {{webarchive |url=https://web.archive.org/web/20090519063251/http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html |date=May 19, 2009 }}</ref> to communicate between the browser and the server. This socket can remain open as long as the browser is at the document hosting the applet. Event notifications can be sent in any format{{snd}} text or binary{{snd}} and decoded by the applet.
 
===The first browser-to-browser communication framework===
Line 127 ⟶ 126:
 
===Streaming===
An application using streaming Comet opens a single [[persistent connection]] from the [[Web browser|client browser]] to the server for all Comet [[Event (computing)|events]]. These events are incrementally handled and interpreted on the client side every time the server sends a new event, with neither side closing the connection.<ref name = "WRC">{{cite web | url = http://www.webreference.com/programming/javascript/rg28/ | title = Comet Programming: Using Ajax to Simulate Server Push | accessdate = 2010-10-20 | last = Gravelle | first = Rob | publisher = Webreference.com | archive-url = https://web.archive.org/web/20101018055530/http://www.webreference.com/programming/javascript/rg28/ | archive-date = 2010-10-18 | dead-url-status = yesdead }}</ref>
 
Specific techniques for accomplishing streaming Comet include the following: