In the course of setting up this forum, I encountered major problems that took a lot of googling and troubleshooting to solve. And the problems, I found out, were all related to WebSocket. Here are a few entries from my Nginx error log file that gave an insight into the nature of the problems:
upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: forum.linuxbsdos.com, request: "GET /socket.io/1/xhr-polling/_wPAI1JGYSBw2sCntjYj?t=1396431796572 HTTP/1.1", upstream: "http://127.0.0.1:4567/socket.io/1/xhr-polling/_wPAI1J", host: "forum.linuxbsdos.com", referrer: "http://forum.linuxbsdos.com/topic/62/wayland-in"
upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: forum.site.com, request: "GET /socket.io/1/websocket/91qN33a HTTP/1.1", upstream: "http://127.0.0.1:4567/socket.io/1/websocket/91qNRaWZ3-mt333a", host: "forum.site.com"
upstream timed out (110: Connection timed out) while reading response header from upstream, client: 127.0.0.1, server: forum.site.com, request: "GET /socket.io/1/xhr-polling/uH9QTAWUGmomqFoy333e?t=1396434162051 HTTP/1.1", upstream: "http://127.0.0.1:4567/socket.io/1/xhr-polling/uH=1396434162051", host: "forum.site.com", referrer: "http://forum.site.com/"
The result of those errors was that the forum was either not loading completely (in Chromium and Android Chrome) or loading with errors (in Firefox)
From the Chromium and Firefox Web consoles came these messages
WebSocket connection to 'ws://forum.linuxbsdos.com/socket.io/1/websocket/91q-mt333a' failed: Unexpected response code: 502 http://forum.linuxbsdos.com/
Another variation of the same error as above.
Failed to load resource: the server responded with a status of 504 (Gateway Time-out) http://forum.site.com/socket.io/1/xhr-polling/91qmt333a?t=1396434040701
Yet another variation of the error.
Failed to load resource: the server responded with a status of 504 (Gateway Time-out)
After a few days of troubleshooting, I determined that the issues were related to Varnish not playing nice with WebSocket. You see, the Web server that powers this website is sitting behind Varnish and I was proxying the Node.JS application that powers this forum through Nginx, without modifying Varnish to handle WebSocket traffic. Once Varnish was configured to handle WebSocket traffic, the forum now works on all browsers that I've tested - Chromium, Chrome (Android), and Firefox. It's not tested on iPad, because I don't have access to one.
The next task is to document how to configure Varnish to play nice with WebSocket. Stay tuned...
Update: See How to configure Varnish for WebSocket traffic.