Re: OT http protocol question

From: Date: Mon, 28 Aug 2000 17:46:12 +0000
Subject: Re: OT http protocol question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13978@lists.php.net to get a copy of this message
Quoting Kenneth Bogucki (k.bogucki@worldnet.att.net): > OT re: http protocol > > > As I understand the http protocol, it is a stateless protocol meaning > once the web page is loaded into the browser, the connection to the web > site is closed. If a user clicks one of the web site links, a > connection is made and the new page is downloaded and displayed in the > browser and again the connection is broken Sort of. There is 'keep-alive', where a browser will hold it's connection to the server for a number of requests. Usually this times out around 30seconds. It still doesn't provide a way to maintain statefulness, which is the intention of cookies. > The question is this...if the above is true, then there is no > difference, in ref: to connection, speed or download time, between > specifying a link as href=http://thisthat.com/page.php and just > href=page.php3 > > right??? The browser would interpret a relative href as having the same path as the file that delivered it. That is to say, there would be no difference, the browser is intelligent enough to chop up both formats and telnet to the server portion and request the file portion. There is, however, a speed difference in putting objects on images.thisserver.com that are requested from www.thissserver.com, as the browser then has to do another DNS lookup. In general, it's best to use relative locations whenever possible. a.

« previous php.general (#13978) next »