Quote:
Originally Posted by pein87
I see I used CYB shoutbox but it constantly send xmlhttprequests even if no ones posting which can bulid server load if its always refreshing. Any way to fix it so it only sends a request/data if the user hits enter or presses the submit button?
|
That requires a constant open connection from client -> server. Once the page has finished loading - that's it from a traditional HTTP point of view (the connection is then closed). AJAX "expands" this by allowing JS to send requests to the server, after the page has loaded.
Shoutboxes in this sense need to continuously poll the server to check for new messages.