On 10/09/2014 06:19 AM, Guillaume "Louis-Marie" Delhumeau wrote:
Hello.
Flamingo is still not HTML5 valid, so I am working on it.
We actually use some <meta> tags that are become invalid in HTML5.
= X-UA-Compatible =
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
It forces the Compatibility mode for IE browsers to use the latest
rendering mode.
We can replace it by adding the X-UA-Compatible in the HTTP headers, but I
actually propose to surround this tag like this:
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<![endif]-->
The code is valid (because inside a comment so the validator does not parse
it) and it is still usable with IE.
Since we can control the headers, and the meta element only works in
certain conditions, we should set this as a header instead. To make sure
this is always set, we can add a servlet filter that adds that header.
For performance (smaller responses), we can only add it if the request
comes from an IE browser.
= imagetoolbar =
<meta http-equiv="imagetoolbar" content="no"/>
it disables the toolbar that comes up when you mouse over an image in MSIE.
Same, I propose to add a conditional comment:
<!--[if IE]>
<meta http-equiv="imagetoolbar" content="no"/>
<![endif]-->
This is no longer needed, XWiki doesn't support IE6 anymore, and newer
versions don't have an image toolbar.
Simply remove it.
= Content-Script-Type =
<meta http-equiv="Content-Script-Type" content="text/javascript"
/>
It defines the default scripting language that is used for intrinsic events
(e.g. onmouseover attributes).
This tag has been deprecated, and there is nothing to replace it. I don't
think this tag is very useful because most of the browsers assume that an
intrinsic event will be handled by javascript. Actually I did not know this
meta tag before today and my inline javascript did always work!
So I propose to just remove it.
This was added since there's an accessibility rule that mandates it.
Since it's an http-equiv, we should add this as a HTTP header as well.
= Distribution =
<meta name="distribution" content="GLOBAL" /> (from
XWiki.XWikiPreferences)
It actually defines either the website should be considered as public or
local (see See
http://www.metatags.info/meta_name_distribution).
I propose to remove it.
This one is ancient, IIRC it was there before my time. I doubt it has
any relevance, and since most XWiki instances are private intranets (I
guess?), "global" is wrong as a default value, yet I doubt anyone ever
changes it. +1 for removing it.
= reply-to =
<meta http-equiv="reply-to" content="" /> (from
XWiki.XWikiPreferences)
To be useful, the content should not be empty, so the administrator should
set it. Moreover, it is very not well-known, and it could be a problem
since the spam bots can read it.
I propose to remove it. If the administrator wants it, she can put it in
the preferences, with the proper value filled.
That's not a valid header... Remove it.
= language =
<meta name="language" content="en" /> (from
XWiki.XWikiPreferences)
It is actually redundant with <html lang="en">.
I propose to remove it.
Remove it.
What do you think?
Thanks,
--
Sergiu Dumitriu
http://purl.org/net/sergiu