title: Best practice for meta data in a html document?
body: <p>I work on a large scale, high volume, public facing web application. The successful operation of the application is very important to the business, and so there are a number of MI tools that run against it.</p>
  
  <p>One of these MI tools essentially looks at the html that is sent to the browser for each page request (I've simplified it quite a lot, but for the purpose of this question, its a tool that does some analysis on the html)</p>
  
  <p>For this MI tool to get the data it needs, we put meta data in the head element. Currently we do it as html comments:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class=""&gt;
  &lt;head&gt;
      &lt;!-- details = 52:AS6[rxSdsMd4RgYXJgeabsRAVBZ:0406139009] --&gt;
      &lt;!-- policy id = 1234567890 --&gt;
      &lt;!-- party id = 0987654321 --&gt;
      &lt;!-- email address = user@email.com --&gt;
      &lt;!-- error = 49 --&gt;
      &lt;!-- subsessionid = bffd5bc0-a03e-42e5-a531-50529dae57e3--&gt;
      ...
  </code></pre>
  
  <p>And the tool simply looks for a given meta data comment with a regex</p>
  
  <p>As this data is meta data, I'd like to change it to html meta tags because it feels semantically correct. Something like this:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class=""&gt;
  &lt;head&gt;
      &lt;meta name="details" content="52:AS6[rxSdsMd4RgYXJgeabsRAVBZ:0406139009]" /&gt;
      &lt;meta name="policyId" content="1234567890" /&gt;
      &lt;meta name="partyId" content="0987654321" /&gt;
      &lt;meta name="emailAddress" content="user@email.com" /&gt;
      &lt;meta name="error" content="49" /&gt;
      &lt;meta name="subsessionid" content="bffd5bc0-a03e-42e5-a531-50529dae57e3" /&gt;
      ...
  </code></pre>
  
  <p>This feels more semantic, and I can get the MI tool to work with it no problem - just a case of changing the regexes. However it now gives me a problem with the w3c validator. It wont validate because the meta names I'm using are not recognised. I get the error "Bad value details for attribute name on element meta: Keyword details is not registered." and it suggests I register these name values on the WHATWG wiki.</p>
  
  <p>Whilst I could do this it doesn't feel right. Some of my meta tags are 'generic' (such as error and emailAddress) so I could probably find an already registered name value and use that. However, most of them are industry/organisation specific. It feels wrong to register a public name value called subsessionid or partyId as these are specific to my organisation and the application.</p>
  
  <p>So, the question is - what is considered best practice in this case? Should I leave them as html comments? Should I use meta tags as above and not worry that w3c validation fails? (though that is increasingly important to the organisation) Should I attempt to register my meta name values on WHATWG wiki, but knowing they are not very generic? Or is there another solution?</p>
  
  <p>Appreciate your thoughts, cheers</p>
  
  <p>Nathan</p>
  
  <hr>
  
  <p>Edited to show the the final solution:</p>
  
  <p>The full answer I'm going with is as follows. Its based on Rich Bradshaws answer, so his is the accepted one, but this is what I'm going with for completeness:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class=""&gt;
  &lt;head&gt;
      &lt;meta name="application-name" content="Our app name" 
          data-details="52:AS6[rxSdsMd4RgYXJgeabsRAVBZ:0406139009]" 
          data-policyId="1234567890"
          data-partyId="0987654321"
          data-emailAddress="user@email.com"
          data-error="49"
          data-subsessionid="bffd5bc0-a03e-42e5-a531-50529dae57e3"
      /&gt;
      ...
  </code></pre>
  
  <p>This validates, so all boxes ticked :)</p>