Businessgame news
By KingIsulgard, Sat 8 Oct 2011 13:31
JavaScript threading
I found a way to do threading in JavaScript. This opens a lot of possibilities for AJAX implementation to the site. Refreshing the shoutbox every 3 seconds, checking if the online users have changed every 30 seconds and see if you got any new messages each minute... Without the need of refreshing the page!
The fact that JavaScript can't thread made it very hard to implement such things with different timers. If you want to know how I made threading possible just check the source code for "threading.js".
View all 8 comments
Mister_Cash
11 October at 20:27
tech news would be interesting for some people including me maybe a section on home page?
Wildjap
12 October at 9:07
Can we please have time stamps for shoutbox message! It's not cool going to the shout box and not knowing if the last message was send two seconds ago or 2 days ago...
KingIsulgard
12 October at 9:54
You can see who is online, but I'll try to work something out. I just wanted to keep it as compact as possible since it is on such a small place.
Wildjap
12 October at 16:32
Could you not just have a label next to the stream that has the date of the last update?