...

View Full Version : Bad value Expires for attribute http-equiv on element meta.



nicky
05-09-2011, 09:00 PM
I have two http-equiv meta tags that are not validating.



<meta http-equiv="Expires" content="Wed, 09 Nov 2011 18:58:34 GMT"/>

<meta http-equiv="last-modified" content="Thu, 14 Apr 2011 12:17:27 GMT"/>


Technically I wrote the code in PHP:



<?php date_default_timezone_set('GMT'); ?><meta http-equiv="expires" content="<?php echo date("D, d M Y G:i:s e", mktime(date("G"), date("i"), date("s"), date("m")+6, date("d"), date("Y"))); ?>"/>

<meta http-equiv="last-modified" content="<?php echo date("D, d M Y G:i:s e", getlastmod()); ?>"/>


When my doctype is set to XHTML 1.0 Strict, these validate, but when I switch it to HTML5, the errors occur.

I haven't been able to find a solution and was wondering if anyone has any insight into this?

I appreciate any and all help!

AndrewGSW
05-10-2011, 02:03 AM
HTML5 uses a simplified sytax for meta tags:

<meta charset=”utf-8”>
but I haven't discovered how or whether this applies to expires, last-modified. Try

<meta Expires="Wed, 09 Nov 2011 18:58:34 GMT"/>
<meta last-modified="Thu, 14 Apr 2011 12:17:27 GMT"/>

If not HTML5 validation is in trial and you might report an issue.

nicky
05-10-2011, 02:25 PM
Gr... :-/ lol



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum