I was analyzing a page using Google Page Speed http://pagespeed.googlelabs.com/#url=http_3A_2F_2Fqweop.com&mobile=false&rule=SpecifyCharsetEarly
and it says that we should specify an explicit character set in HTTP Headers.
So basically my question is what determines what character set I should be using?
which character sets will have the least size / fastest ?
OR
What kind of savings can I have by using ASCII instead of say UTF-16 ?
Should i simply put utf-8 and fuggedaboutit ?
You should include the charset that the page is encoded in. You’ll want to be sure that you’re telling the truth. For instance, there are a lot pages running around without a
charsetdesignation (and therefore being treated as UTF-8 or ISO-8859-1) which are actually encoded as Windows-1252. That’s fine as long as you stick to character codes they have in common (certainly 32-127 and all the important control characters like newline, tab, etc.). But you start with any accented letters or special symbols, and suddenly your page doesn’t look right cross-browser.This article on charsets and Unicode by Joel Spolsky is well worth a read, if you haven’t already.