title: Creating an AJAX based chat system. How to avoid page refresh on submitted content and show new messages live
body: <p>I'm trying to make a little and simple chat system on PhP.<br />
  My Idea was simple really, I have a form that send a text to a script in PHP and that script save the var in a Database, then the other user refresh the page to download the new message and display it on the chat box.<br />
  The problem comes, when I say refresh the page.<br />
  I just think that probably would be a problem for the user refresh the entire page every second or less thank's to a JavaScript function.<br />
  The original idea was to use <code>setInterval()</code> but know I'm thinking that this can be a bad idea.<br />
  I'm not sure, but from chrome when you refresh a form it will save the form and fill it automatically, once you have finished the refresh, does every browser do that?
  <br />
  Willa a JavaScript function for refreshing the page be a problem for who have a really slow connection?<br /><br />
  But most important, to fix the problem, is actually possible to just refresh a specific PHP script, that allow the user to refresh only that script and download the new message, without refreshing the entire page every second?<br /><br />
  All the help would be appreciated.</p>
  
  <p>-NOTE-
  <br /><br />
  To be honest, the guy that want me to do that chat system asked me to not use JavaScript, so theoretically I'm not even allowed to use <code>setInterval()</code><br /></p>