Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why HTTP was designed to be a pull protocol?

Tags:

html

http

I was watching many presentations about Html 5 WebSockets , where server can initialize connection with client and push the data without the request from the client.

We don't need Polling etc.

And , I am curious , why Http was designed as a "pull" and not full duplex protocol in the first place ? What where the reasons behind that kind of decision ?

like image 670
Michal Franc Avatar asked Dec 16 '22 13:12

Michal Franc


2 Answers

Because when http was first designed it was meant to be used to retrieve documents from a server. And the easiest way to do is when the client asks the server for a document and gets it delivered as response (or an error in case it does not exist). When you have push protocol that means the server would need to keep client connections around for potentially a long time creating more resource management problems - remember we are talking about early 1990s here.

like image 75
ChrisWue Avatar answered Jan 02 '23 17:01

ChrisWue


Http was designed for simply retrieving hypertext documents from a server. There were no reasons to push anything to the client when the pages were just pure, static html without scripting capabilities.

Since there was no need at the time for pushing things back to the client, the protocol was kept simple.

like image 33
Anders Abel Avatar answered Jan 02 '23 17:01

Anders Abel