+ Reply to Thread
Results 1 to 4 of 4




  

Thread: Auto Update Client Page Without Constant Refresh

      
  1. #1
    Jedi Master articweb is on a distinguished road
    Join Date
    April 19, 2008
    Location
    Gloucestershire - UK
    Posts
    101
    Rep Power
    5
    Feedback Score
    0

    Default Auto Update Client Page Without Constant Refresh

    Hi.

    I have been asked to look into developing an online takeaway/delivery order system. It all seems fairly straightforward except for one part, getting the orders through to the takeaway outlets.

    I am aware that I can just set up a computer within the outlet, connect it to the internet and log them into the system on an "auto-refresh" page which will list all the latest orders. However this seems a bit resource heavy.

    Is there a way in which I can automatically post data from the server to the client (computer in an outlet, either onto the screen or via a printer). There was a thread a few weeks ago about Facebook using AJAX to do this, anyone know how?


    Any help would be brilliant,
    Josh.
    Website Stats | Website Hosting | SEO Blog

    Got Computer Problems? Need help or remote support?

  2. #2
    Jedi Master GordyMac will become famous soon enoughGordyMac will become famous soon enough GordyMac's Avatar
    Join Date
    October 18, 2008
    Location
    Nova Scotia, Canada
    Posts
    143
    Rep Power
    4
    Feedback Score
    0

    Default Re: Auto Update Client Page Without Constant Refresh

    Yeah I think you're referring to my thread.. How to auto update... - Webmaster Forum

    I didn't get much out of that either.. I'd still like to know if anyone has experience in this..

  3. #3
    Jedi Master articweb is on a distinguished road
    Join Date
    April 19, 2008
    Location
    Gloucestershire - UK
    Posts
    101
    Rep Power
    5
    Feedback Score
    0

    Default Re: Auto Update Client Page Without Constant Refresh

    Yeh it was your thread indeed.

    It would be great to know how to do it, a lot of the LiveChat systems are using it now so someone must know how! It saves having to waste a load of resources on auto-refreshing the page.

    articweb added 1296 Minutes and 45 Seconds later...

    Asked on Yahoo! Answers and got the following replies:

    Quote Originally Posted by Yahoo! Answers (mipav200...)
    Ajax has this thing called xmlhttprequest which can do a http request without reloading the page. That is all you can do.
    So: from time to time do a xmlhttprequest, get the new data and post it on the website without reloading it
    and...

    Quote Originally Posted by Yahoo! Answers (just "JR")
    You have three "machines":
    - The buyer's machine, the one that places the order and send it to the server.
    - The server, who receives the order, and updates the database.
    - The Shop monitor, who "looks" at the database.
    Remember one thing: a server NEVER send anything to anyone by itself: the server only RESPONDs to a request.

    So, the Shop monitor asks the page, receives it, then... do nothing.
    The database can be updated 1000 times, the monitor will NOT be informed, UNLESS it makes a request.
    To do this (and it is the technique of most chat boards), you set-up a small timer in the Shop monitor page, sending a request every, say, 5 seconds, to the server. (for a chat, every 2-5 sec is ok, for orders, maybe 20, 60 secs? - to be adjusted).
    On the request, the server checks if the order list has "changed" (more records or something else). It the order list has not changed, the server sends a reply "nothing new" (sort of), otherwise, it sends a reply to update a part of the screen (AJAX).
    You could have a part of the screen as a scrollable box, or an iframe. The server sends the order list from the last first, refreshing the list every x secs. The rest of the screen does not change.

    Very scarce on ressources!
    Yahoo! Answers: How can I make a page automatically update when a database table is updated?




    This coupled with W3 schools tutorials and Google managed to provide me with the knowledge I wanted. Hopefully it's of use to a few other people?
    Last edited by articweb; Jan 21st, 2009 at 8:00 am. Reason: Automerged Doublepost
    Website Stats | Website Hosting | SEO Blog

    Got Computer Problems? Need help or remote support?

  4. #4
    Jedi Master GordyMac will become famous soon enoughGordyMac will become famous soon enough GordyMac's Avatar
    Join Date
    October 18, 2008
    Location
    Nova Scotia, Canada
    Posts
    143
    Rep Power
    4
    Feedback Score
    0

    Default Re: Auto Update Client Page Without Constant Refresh

    Thanks artic.. let me know if you get everything working the way you want it to please

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Which FTP Client do you use?
    By Ohiosweetheart in forum Internet
    Replies: 171
    Last Post: Apr 24th, 2009, 7:20 am
  2. How to auto update...
    By GordyMac in forum Programming
    Replies: 2
    Last Post: Dec 3rd, 2008, 7:55 pm
  3. Google going for a page rank update?
    By iowadawg in forum PageRank
    Replies: 21
    Last Post: Jun 25th, 2007, 11:32 am
  4. Which mail client do you use?
    By Big Dan in forum Internet
    Replies: 26
    Last Post: Apr 20th, 2007, 11:44 am
  5. Your favourite FTP client?
    By absurd in forum HTML & Website Design
    Replies: 12
    Last Post: Jan 1st, 2007, 1:44 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads