AJAX Commentary
Live chat enhancement built directly into the core commentary system (not a separate installable module, since there's no "AJAX Commentary" entry in the module list because there's nothing to install or uninstall). Automatically refreshes commentary sections every 5 seconds, fixed, for every player, without a page reload. Plain JavaScript (no jQuery) polls for new comments and pauses automatically while the browser tab is hidden. Posts comments without refresh. Auto-pauses in sync with your session's inactivity timeout, which defaults to 15 minutes, not 6.
How It Works
Auto-Refresh System:
- JavaScript timer polls the server every 5 seconds, flat. There's no option to speed it up or slow it down, everyone gets the same cadence
- Fetches only the comments newer than the last one you saw, without reloading the page
- Updates commentary div with new content (no page reload)
- Automatically skips polling entirely while the browser tab is hidden (Page Visibility API), then polls immediately on refocus
- On a full page load, the first comment you have not seen before is marked with a divider: a bold, gold-edged row that shows where you left off in a busy room
- Resets timer for next poll
Posting Comments:
- Type comment in form
- Submit via AJAX form submission (plain JavaScript, not jQuery)
- Comment posted instantly without page reload
- Form clears after successful post
Inactivity Detection:
- Page time counter tracks time since last user interaction
- Idle-pause timing is derived from your session's inactivity timeout (15 minutes), not a fixed 6-minute window
- Idle that long and auto-refresh pauses behind a resume pill: "Live Update stopped due to inactivity, click here to reactivate it." If messages landed while the pill was up, it counts them instead and reads "▲ 4 new messages," so the backlog announces its own size
- Separately, when the session itself is near expiry, the notice becomes a warning with a link to stay logged in; let the session lapse and it becomes a link to log back in
- Click any of them → Resets the session timer (or logs you back in) and resumes auto-refresh
Nothing for Players to Adjust
There is no "Live Chat" preferences panel and no refresh-speed dropdown. The 5-second poll interval is hardcoded for every player: you can't speed it up, slow it down, or turn it off from a preferences page. The only thing you personally control is your session's inactivity timeout, and even that is the same for everyone (normally 15 minutes), not a per-player choice.
Benefits
For Users:
- Real-time chat experience without manual refresh
- Faster conversation flow in village commentary
- No lost text when typing during page refresh
- Consistent, predictable update speed (5 seconds, same for everyone)
For Server:
- Lower bandwidth than full page reloads
- Polling stops entirely for hidden/background tabs, and idle-pauses in step with your session timeout, saving server resources
- Efficient JSON responses vs full HTML pages
Limitations
- Requires JavaScript: No live chat without JS enabled (falls back to manual refresh)
- Fixed Refresh Rate: Everyone polls every 5 seconds; there's no way to speed it up or slow it down
- No Offline Queuing: If connection lost, comments don't queue (user must refresh)
- Session-Length Timeout: Polling idle-pauses on the same clock as your session's inactivity timeout (15 minutes), and you'll need to click through the "still there?" prompt to keep it going
Comparison to Manual Refresh
Without AJAX Commentary:
- Must manually click "Refresh" or reload page
- Lose typed text when refreshing
- Full page reload every time
- Slower conversation
With AJAX Commentary:
- Auto-refresh every 5 seconds
- Keep typed text during refresh
- Only commentary section updates
- Real-time chat feel
Strategy
What You Can Actually Control:
- Nothing about the refresh rate: it's fixed at 5 seconds for every player, so there's nothing to tune here
- Your session's inactivity timeout (server default: 15 minutes) governs when idle polling pauses; staying active in the game resets it naturally
If You Want to Avoid It:
- Disable JavaScript in your browser (falls back to manual, page-reload-based commentary, with everything else that implies)
- Otherwise, live polling is just how commentary sections behave now; there's no in-game toggle to turn it off
AJAX Commentary: where your browser polls the server every 5 seconds asking "any new messages? any new messages? any new messages?" like an impatient child on a road trip, and once your session's been idle long enough (15 minutes, not the urban legend of 6) the system makes you click a button to prove you're still awake. There's no dial to turn the chattiness up or down. Five seconds is five seconds for everyone, and there was never a module to install in the first place; this has been quietly baked into the game's core since before you got here. At least you don't lose your carefully-typed insult when the page auto-refreshes.