bootfit — 2012-08-23T07:20:23-04:00 — #1
I've got a site that I'm trying to optimise for Google Page Speed.
There's a couple of issues that are still outstanding; one telling me I need to Specify a Character Set
I've tried with two separate Char Sets:
<meta http-equiv="Content-Type" content="text/html; UTF-8" />
<meta charset="UTF-8" />
...with neither passing Page Speed check.
What am I doing wrong? What is the correct Char Set for an HTML5 page?
snickn — 2012-08-23T07:45:41-04:00 — #2
Do you administer the server this is on? If not, try to add this to .htaccess:
AddCharset ISO-8859-1 .html
AddCharset ISO-8859-1 .htm
AddCharset UTF-8 .xml
If you're serving as XHTML 1.0 you officially must specify the charset in the headers.
bootfit — 2012-08-23T07:56:05-04:00 — #3
So if I add the above code to the .htaccess file I don't have to specify a charset in the header?
snickn — 2012-08-23T08:08:23-04:00 — #4
It won't hurt to specify it (the same) in both, but no, if you add the above then it should be in the headers, which is XHTML 1.0 compliant.
bootfit — 2012-08-23T08:09:11-04:00 — #5
Spot on - cheers mate. I'll give that a go tonight.
ralphm — 2012-08-23T09:17:55-04:00 — #6
When you say "it doesn't pass", what does that mean? You don't need the closing slash in HTML5. This shoud be fine:
bootfit — 2012-08-23T10:02:26-04:00 — #7
I mean the google page speed checker picks up I haven't specified a Character Set - although I thought I had.
Really? I have closing / in all my metas and the page passes the html5 validation.
ralphm — 2012-08-23T10:32:52-04:00 — #8
Yes, either is OK in HTML5. But personally, I think it looks messy.