Forum Moderators: open

Message Too Old, No Replies

Meta Element "Expires" Dynamic Days instead of static?

Because changing expires in 1997 on 2K pages would require effort!

         

JAB Creations

3:34 am on Mar 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a few questions about meta elements...

1.) Is there some sort of standard, W3C references?
2.) Do any of the search engines bother to make use of the expires (ore revisit I've also seen used) meta elements?

...and my main question...

3.) How can I define a dynamic value with plain vanilla XHTML of 15 days in example versus a static value such as "April 4, 1997" so I would not have to correct and re-upload every page simply to update the meta element "expires"?

<meta http-equiv="expires" content="?" />

- John

encyclo

3:42 am on Mar 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Meta expires elements are notoriously ineffectual when attempting to control caching in a meaningful way. Assuming you're using Apache, you can use mod_expires to set the appropriate HTTP headers for caching different types of files. This will allow you to do what you want, which is to set a expiry time of x days from the date the file is served. You can also set up caching if you're using a server-side language such as PHP to generate dynamic pages, but the issue is much more complex than with static content.

The following is an excellent resource with examples for handling caching effectively:

  • Caching Tutorial for Web Authors and Webmasters [mnot.net]
  • JAB Creations

    4:33 am on Mar 2, 2007 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Thanks for the link, it's very well written. :)

    - John