Specify a Character Set Early
HTML5 requires browsers to buffer a response when a character set is not specified in the Content-Type header or an HTML <meta> tag. Thus, we recommend always specifying a character set for HTMl documents.
Details
We tested character set buffering behavior with the following popular browsers:
- Internet Explorer: All versions of IE tested did not buffer responses. In contrast, all the other browsers tested do buffer when a character set is not specified. Note that when a character set is specified late in the document, Internet Explorer will redraw the page using the specified character set if it is not the same as the default character set.
- Firefox: Through version 3.5, specifying the Content-Type header as text/html, without specifying a character set, disables buffering in Firefox. Without a Content-Type header, Firefox buffers up to 1024 bytes. Firefox 3.6 buffers 512 bytes.
- Chrome: Chrome buffers up to 1024 bytes when a character set is not specified. Chrome will parse a character set from either the Content-Type HTTP header or the HTML META tag.
- Safari: Safari always buffers 1024 bytes, regardless of the contents of the Content-Type header or html META tag.
See also
No Tech Support Here: Please use comments to give suggestions for improving this wiki page. If you have a question, please send email to page-speed-discuss@googlegroups.com . Questions asked here will not be seen by people who can answer them.
typ: "HTMl" documents? That's either a lower-case 'l' or an upper-case 'i', but should be fixed nonetheless...
If you need information for Apache, please check http://www.askapache.com/htaccess/setting-charset-in-htaccess.html
check http://www.gamku.com/
W3 says that with 304 headers (cached pages) Content-Type and charset SHOULD NOT be inserted. Google Page Speed is not able to detect if an HEADER is 200 OK or 304 Not Modified ?