• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

How does the refresh work ?

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby BlueScreenJunky » Wed May 23, 2007 6:40 pm

Hi there, and first of all congratulations to the devs for that awesome script, I'm really impressed.

Now I'm very curious as to how it works, since I found phpFreeChat while searching for inspiration to make my own little ajax chat for my website. I could use phpFreeChat, but what I need is much more simple than that (it would be more of a dynamic shoutbox actually), and I like to do everything by myself, even if I know it will never be as good.

Anyway, I could really use a little help on the refresh thingy. I was thinking of adding a line to a text file (plain text or xml) everytime someone sends a message and using xmlhttprequest to reload this file every x milliseconds (where 10 < x < 1000). But I'm affraid this would be extremely slow, and phpFreeChat seems too responsive to work that way, so I guess there must be a smarter way ^^;
So I'd be very thankful if the devs or someone familiar with phpFreeChat could point me in the right direction. =)

Thanx.



edit : Nevermind, I did it my way and it seems to work ok. It probably wastes some bandwidth, but saves some CPU time.
Last edited by BlueScreenJunky on Fri May 25, 2007 9:07 am, edited 1 time in total.
BlueScreenJunky
New member
 
Posts: 1
Joined: Wed May 23, 2007 6:19 pm
Top

Postby phpfreechat » Sat May 26, 2007 1:21 pm

Currently, phpfreechat uses simple periodical refreshes.
By default each 5 seconds.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 6 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub