I'm curious why it is done this way. Surely, it would be simpler to just serve the actual HTML content, rather than a script that writes HTML.
What is meta?
- Any Stack Exchange user can ask a question
- The community provides support, votes on ideas, and reports bugs
- Your voice helps shape the way Stack Exchange operates
Historically, this was to keep Google from caching system messages.
In the olden days, a page on Stack Overflow would take an hour or so to get into Google and then stay there for a rather long time. This would mean people we're getting "The system is going down for maintenance at 11 PM EST" and stuff days, or even weeks, after the event had passed.
Of course, it's been a looong time since that code was written and Google's gotten a lot smarter. For one, Stack Overflow pages appear almost instantly in Google (and are frequently refreshed, though we can't guarantee all pages are refreshed).
We'll be changing this behavior... when we figure out another workaround.
*I discovered this while trying to remember why we did this, it's been months since anyone touched anything related to system messages. Ironically, I apparently wrote this code originally and just didn't remember it.