smerny Posted May 31, 2009 Share Posted May 31, 2009 how can you update things real time without reloading a page... like chat programs and such do? Link to comment Share on other sites More sharing options...
jlhaslip Posted May 31, 2009 Share Posted May 31, 2009 Ajax - combination of javascript and server-side scripting. Link to comment Share on other sites More sharing options...
Synook Posted June 1, 2009 Share Posted June 1, 2009 AJAX provides almost-real-time updating (i.e. within a second), but since HTTP is a "pull" protocol (clients have to make requests for resources), you can never get true real-time changes (e.g. no action games ). Link to comment Share on other sites More sharing options...
Ingolme Posted June 1, 2009 Share Posted June 1, 2009 Real-time applications are done with sockets and compiled server-side languages that are constantly running and listening to a certain port, while on the client side a program pushes data to the server through the socket.With AJAX and PHP you can get things to go fast enough for a chatroom or a game of chess, but you wouldn't have it fast enough for an online racing or fighting game or anything like that. Link to comment Share on other sites More sharing options...
smerny Posted June 2, 2009 Author Share Posted June 2, 2009 using ajax, what would be used to keep the page up to date if new information is pushed into the database by another source (like you didnt do anything to trigger it in your own browser window)? Link to comment Share on other sites More sharing options...
Synook Posted June 2, 2009 Share Posted June 2, 2009 You just have a timed event (i.e. using JavaScript's setTimeout() and setInterval() functions) that constantly checks for new data. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.