Are there tutorials for a "Macrumors Live" style feed?
March 20, 2007 6:10 PM   Subscribe

Are there any tutorials on how to make a low-traffic version of the AJAX MacRumors Live page they use for keynotes?

I'm not interested in the crazy high-traffic architecture, I'm just looking for a page that describes how to use XMLhttprequest to push plain old HTML to a number of users at the same time.
posted by Jairus to Computers & Internet (4 answers total)
You could try something like this, or just add a meta refresh tag (since it's low traffic, there isn't a lot of sense in putting too much effort into the code...)
posted by tmcw at 7:15 PM on March 20, 2007

how to use XMLhttprequest to push plain old HTML to a number of users at the same time

That's not what it's doing. Each client is still just polling the server every x seconds, but instead of downloading the entire page again, it just pulls down new posts if there are any.
posted by chrismear at 7:18 PM on March 20, 2007

Response by poster: tmcw: It's low traffic compared to MacWorld, but I don't want to refresh a whole page of javascript, graphics, code, etc... I only want to refresh text.

chrismear: Interesting, I thought it was push/reverse AJAX. Polling for just one file to refresh the main content would work fine, though.
posted by Jairus at 9:23 PM on March 20, 2007

Jairus, I would recommend reading any one of the numerous AJAX "Hello World" tutorials (for example), adapting it in two ways:
  • Instead of doing the request (the JavaScript sayHello() method in the above example) just once, do it repeatedly using the JavaScript setTimeout() method (here).
  • Instead of putting the text of the resulting page into a DIV, put the resulting text into a DIV that sits inside of another DIV so that you have style control (for CSS) of the entire "conversation."
Let me know if you have any questions.
posted by yellowbkpk at 5:23 AM on March 21, 2007

« Older Teach a Martian how to be a boyfriend.   |   Info for a live show on U of Chicago campus Newer »
This thread is closed to new comments.