Goose87 Posted October 21, 2009 Share Posted October 21, 2009 Dear all, I apologise for my serious lack of knowledge in this area.. and i'm pretty sure that you can't use php, but i just need advice + some support if that's possible. I have recently added a chat feature to my website. It currently displays on every page in the title bar. It displays 30 rows of chat and updates every time the page is changed or refreshed. I would like the mysql query that collects the latest messages to update every 5-10 seconds if that's possible.. or ideally... update when there is a new post.. that would be perfect.. Can someone point me in the right direction. Or ideally, help me out with this. Many thanks in advance. Goose. Link to comment https://forums.phpfreaks.com/topic/178511-solved-refreshing-part-of-a-page-over-and-over/ Share on other sites More sharing options...
mrMarcus Posted October 21, 2009 Share Posted October 21, 2009 look into AJAX / Javascript to have the chat box update asynchronously (without needing to refresh the page). tons of tutorials out there .. look into either jQuery or MooTools for the infrastructure. Link to comment https://forums.phpfreaks.com/topic/178511-solved-refreshing-part-of-a-page-over-and-over/#findComment-941466 Share on other sites More sharing options...
JAY6390 Posted October 21, 2009 Share Posted October 21, 2009 It's a bad idea to do refreshes every 5-10 seconds on your server per user, and will have serious implications when you get a lot of users accessing your site at the same time Link to comment https://forums.phpfreaks.com/topic/178511-solved-refreshing-part-of-a-page-over-and-over/#findComment-941471 Share on other sites More sharing options...
Goose87 Posted October 21, 2009 Author Share Posted October 21, 2009 Maybe it's a feature I should just forget about? That did cross my mind, but as it's just one query.. i didn't think it would be that bad.. meh.. to be honest, i will look into the code to do it, but I won't implement it. It's just not what I need for that feature I think.. Thanks anyways all. Link to comment https://forums.phpfreaks.com/topic/178511-solved-refreshing-part-of-a-page-over-and-over/#findComment-941573 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.