Sign In/My Account | View Cart  
advertisement

Article:
 Very Dynamic Web Interfaces
Subject: Concerns
Date: 2005-04-03 07:00:05
From: sunnyO5

I am excited about the possible applications of XMLHttpRequest Object but I have some concerns:


1) Using XMLHttpRequest Object can save a lot of bandwidth but does it support caching of webpages in the browser? Webpages using XMLHttpRequest Object seem to loose the browser's history features; you can't use the Go back and forward buttons. Like in the Apple's example (http://developer.apple.com/internet/webcontent/XMLHttpRequestExample/example.html), one has to make the choices again to view the information. So can't view the information offline.


2) In the Google Suggest example, for each key press a request is sent to the server. So if you have 50 users typing an average of 10 letters, you have more than 500 requests sent to the server. Is this a huge concern for developing applications with this sort of feature (like dynamic function lookup on php.net)?


Nevertheless, XMLHttpRequest Object promises a better interaction with the user.
Thanks.


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Oldest First
  • Concerns
    2005-04-05 12:22:37 pandelic [Reply]

    Google Suggest doesn't submit on each keystroke, but rather every set interval, which reduces the number of requests for fast typists but still provides good response time.

  • Help please
    2005-04-07 17:23:52 rkhlin [Reply]

    XMLHTTPRequest is really fantastic to use.
    But I am having a problem at the moment.
    When I wrote a JS function which calls 1st url to change one div, then it calls another url to change another div.
    However only the 2nd url call is executed, the function simply ignore the 1st call (so only div2 got updated).
    Is there a way I can make sure it get the 1st url done and then the 2nd url sequentially, Since no multi-threaded is supported in current JS.
    I used window.setTimeout(1000); in between 2 calls, then it wont go at all.


    Please help!

    • Help please
      2005-04-07 23:22:37 rkhlin [Reply]

      Solved myself, use setTimeOut(func2,msec);

      • Help please
        2005-04-21 11:27:32 nGear [Reply]

        The second one is probably not coming through, because you donot wait for the first request to finish. (i.e. the readystate did not get to 4 in the eventhandler)
        So your current solution won't work if the server takes a long time to serve the xml for the first div.

        • Help please
          2005-05-27 12:52:36 brockweaver [Reply]

          See the response I just posted for a simple solution to this thread safety problem. I didn't notice this thread before I posted, sorry about that.


          The name of my post is something like "A threadsafe implementation of XMLHTTPRequest"


Sponsored By: