SunLit Home Page Optimized [1]

Posted by Pvt_John on Mar 06, 2005 - 09:25 AM

Notice the SunLit home page loading any faster this morning?

Something I have wanted to do ever since we put the new site together, but never had the technical ability to do, was to cache the live game server status information in the "Now Playing" box at the right. Thanks to our friend and founder of SunLit, Lazarus Long, it's now up and running!

Previously, whenever anyone came to the home page some javascript code first polled each and every server, then displayed the data. Thus there was sometimes a long delay before the web page was displayed while the web server waited for the game server to respond.

If you had the (far superior) Mozilla Firefox [2] web browser, you would see the the entire web page except the Now Playing box to load, then the Now Playing box would fill in as the game servers responded with information. However, if you are one of the many with MS Internet Explorer (ick!), your web browser would wait for all the data on the page to be ready before the page was displayed. So you would have seen a blank screen for quite a few seconds before the home page was displayed.

Now that Laz has fixed it up so the live game server data is cached, it is read out of the cache on the web server whenever someone comes to our home page. You should notice the web page displays much faster.

The data in the Now Playing box is cached once every minute. If you'd like a real-time view of a particular game server, and to see who's playing, simply click the map thumbnail for that server and you will get the phpUA [3] live server status page.

Happy browsing :) And thanks, Laz!

Codito, ergo sum "I code, therefore I am"
- Lazarus Long
Only logged in users are allowed to comment. register/log in [4]
Links
  1. http://sunlitgames.net/index.php?module=News&func=display&sid=125
  2. http://www.mozilla.org/
  3. http://phpua.sourceforge.net/
  4. http://sunlitgames.net/index.php?module=Users&func=register