Quote:
Originally Posted by CrossBones
Any help on this guys? :cross-eyed:
|
I don't think you understand how AJAX works (and to be honest, this mod is not a very good choice to demonstrate what AJAX is supposed to be used for).
The shouts only refresh every few seconds because that is the refresh interval defined in the code. If you lessen it you will see the shouts faster but you will dramatically increase load and network utilization. If you are running this on a shared server then your service provider will probably shut you down. If you are on a dedicated server, the ISP may complain to you about the bandwidth utilization or try and charge you for the usage.
Again, this really isn't a very good demonstration of what AJAX is for, it has dynamic content and must be fully refreshed by all browsers every interval, so the fact that the whole page doesn't reload is nice but could be accomplished with iframes or something else.
If you understand RSS, this is the equivalent of turning your RSS reader up to check a news source every 5 seconds. There isn't much you can do to optimize this if 100 people are sitting on your homepage watching the shouts go by.