Citat:
Ursprungligen postat av Burkm4t
Med hjlp av samma kod som hanterar svar frn konventionella AJAX-requests s ska det g att ta emot requests som inte klienten sjlv har begrt, utan som webbservern (viss speciell funktionalitet krvs) sjlv skickar till utvalda klienter, nr en viss hndelse intrffar.
Exempelvis i en chat s fr alla klienter ta emot ett paket innehllande den senaste chat-inlgget, helt asynkront, utan att dom behver skicka en begran. Hndelsen invokeras allts p servern nr ett nytt chat-inlgg tas emot, som d skickar ut ett svar till alla berrda klienter.
Hoppas det frtydligade lite.
Detta gr inte i enighet med HTTP/1.1. Du pratar kanske om ngot annat protokoll, men eftersom du nmner ajax s uppfattar jag det inte s.
Om jag mot frmodan skulle ha fel vill jag ha kllor, det skulle innebra att jag skulle kunna lura vilken weblsare som helst att surfa till i princip vilken adress som helst.
I chat exemplet r det en javascript timer frn weblsaren som begr uppdateringar.
Frn Wikipedia:
Citat:
HTTP is a request/response standard as is typical in client-server computing. The client is an application (e.g. web browser, spider etc) on the computer used by an end-user, the server is an application running on the computer hosting the web site. The clientwhich submits HTTP requestsis also referred to as the user agent. The responding serverwhich stores or creates resources such as HTML files and imagesmay be called the origin server....
Citat:
An HTTP session is a sequence of network request-response transactions. An HTTP client initiates a request. It establishes a Transmission Control Protocol (TCP) connection to a particular port on a host (typically port 80; see List of TCP and UDP port numbers). An HTTP server listening on that port waits for a client's request message. Upon receiving the request, the server sends back a status line, such as "HTTP/1.1 200 OK",