Re: Controlling Server-Affinity (Was Re: ajax - dynamic update)



steffen haugk said the following on 11/23/2007 8:48 AM:

<snip>

PS

The xmlhttprequest object has a readyState property, i wonder what 3
(Receiving) means, documentation says 'Some data has been received'.

It means some has been received. What you don't know from it is how much has been received. It could be anywhere from 0.00000001% of the request all the way up to 99.99999999999% of the request.

Is it as simple as that? I shalll investigate.

No. It is not as simple as that, but, you are on the right track.

Rather than make one request and try to determine when the first record is returned, simply make a request for the first record, when the first record is received, display it and then make a second request to the server for the rest of the request.

User makes request.
Browser request one item from the server.
Server returns one item, starts preparing the rest.
Browser gets first request back, asks for the rest.
Server returns the rest, browser displays it.

How you go about doing that depends on what method you want to use. Whether an XHR request, dynamic js files, or some other method. Personally, I think the dynamic js files would be the simplest.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.



Relevant Pages

  • Re: Banned customer: John Duchi
    ... you never acknowledged that you DID receive a request ... anywhere in my request for the tracking number like you put ... acknowledge receiving it. ... first negative feedback instead of writing to me first. ...
    (rec.games.pinball)
  • Re: The beauty of Lion.
    ... them contained a request to confirm that I read the email. ... Disposition-Notification-To header in the message. ... A request for the receiving user agent to issue message disposition ... What email program did you use to open the email, ...
    (comp.sys.mac.advocacy)
  • ASPNET account doesnt exist on Windows Server 2003
    ... An unhandled exception occurred during the execution of the ... granting access rights to the resource to the ASP.NET request identity. ... Kept receiving the same error. ... I then found the following to try to recreate the ASP.NET account using the ...
    (microsoft.public.windows.server.general)
  • Re: read receipts
    ... that the "request" is actually made by the transmitting client, ... the receiving server. ... reaching the client software. ... Verifying that the client is receiving them should be pretty easy. ...
    (microsoft.public.exchange.admin)
  • utf8 url encoded letters and their %values
    ... I have a javascript running at the server side, receiving both POST ... The POST request works fine, ... But if I type the request directly into the address bar, ... script fails to read it correct. ...
    (comp.lang.javascript)