var timer; // Place timer in global scope to avoid it getting GC'ed prematurely function handleRequest(request, response) { response.setHeader("Cache-Control", "no-cache", false); response.setHeader("Content-Type", "text/html", false); response.write('\n\n\n\n'); response.bodyOutputStream.flush(); response.processAsync(); timer = Components.classes["@mozilla.org/timer;1"] .createInstance(Components.interfaces.nsITimer); timer.initWithCallback(function() { response.write('\n\n\n

Normal meta. Non-ASCII in comment before.

\n

Test: \u00E6

\n

If ж, meta takes effect

\n\n'); response.finish(); }, 10, Components.interfaces.nsITimer.TYPE_ONE_SHOT); }