On Tue, 2011-04-26 at 12:37 +0300, Eli Orr (Office) wrote: > Dear PHP Gurus, > > I have wrote a service that respond to a client HTTP GET request with > BLOB of data: > http://mimmage.com/cms/client_initialize1.php?OPERATOR=MIRS&ID=23412341234&OS=RIM > > The first time I call the HTTP GET it works very slow.. next calls it > works much faster. > Please advise how can I enhance the server response in the first call. > Any method for the client to initialize a standby like service with the > server ahead of the specific request ? > > Is there any way HTTP 1.1 operation fashion can speed it up ? > e.g. http://www8.org/w8-papers/5c-protocols/key/key.html > > Looking forward for your wise and experienced advise for this heavy issue. > > Thanks > > Eli > eliorr.com > > Could it be that there is some mechanism which is caching the response (which is fine for GET requests as they are intended to be cached) on the server? Caching can be done in PHP (a lot of frameworks contain rudimentary caching functionality) or by Apache itself, so there are a few places you can check. To test for caching, have the client-side part of the request add a random suffix like ?t=timestamp so that the server thinks this request is unique. If each request comes back slow, it's likely that the subsequent ones being faster is the result of caching. -- Thanks, Ash http://www.ashleysheridan.co.uk