Move character set info with first 1024 bytes.

Firefox expects the header within the first 1K. See https://bugzilla.mozilla.org/show_bug.cgi?id=672453.

Fixes the following warning from FF console:
```
The page was reloaded, because the character encoding declaration of the HTML document was not found when prescanning the first 1024 bytes of the file. The encoding declaration needs to be moved to be within the first 1024 bytes of the file.
```