4

Is it valid to use time stamp instead normal date format in meta tags?

for example:

<meta name="revised" content="Wednesday, September 24, 2014, 2:51 pm" />

to

<meta name="revised" content="1431475718" />

or for

<META NAME="Expires" CONTENT="1431475718">
ali
  • 103
  • 4

2 Answers2

2

You may not use revised or expires in HTML5, as these metadata names are neither defined in the spec nor registered on MetaExtensions.

No one tried to register revised. Someone tried to register expires, but a spec was missing, so it was not approved.

So …

  • without specifications for these metadata names, authors don’t know when and how to use it, and consumers don’t know how to interpret it.

  • if there are specifications, these metadata names could be registered on MetaExtensions, and it would be clear which format the value must have.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
1

From my research, [1] [2], it seems that there isn't a mandated format, however it is recommended to use ISO 8601.

Date may be used to express temporal information at any level of granularity. Recommended best practice is to use an encoding scheme, such as the W3CDTF profile of ISO 8601 [W3CDTF].

Google also recommends following this format. You could use a timestamps and some crawlers will try to handle them (like Google), you would be better off following ISO 8601 (2015-05-03T15:38:45+00:00).

Daniel Compton
  • 13,878
  • 4
  • 40
  • 60