Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2008
    Location
    Michigan
    Posts
    216
    Thanks
    10
    Thanked 1 Time in 1 Post

    Bad value Expires for attribute http-equiv on element meta.

    I have two http-equiv meta tags that are not validating.

    Code:
    <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 Code:
    <?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")+6date("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!

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    HTML5 uses a simplified sytax for meta tags:
    Code:
    <meta charset=”utf-8”>
    but I haven't discovered how or whether this applies to expires, last-modified. Try
    Code:
    <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.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #3
    Regular Coder
    Join Date
    May 2008
    Location
    Michigan
    Posts
    216
    Thanks
    10
    Thanked 1 Time in 1 Post
    Gr... :-/ lol
    Last edited by nicky; 05-10-2011 at 02:27 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •