Server response Dates same as current
« on: October 21, 2008, 05:13:29 PM »
I have tried to post on the standalone forum, though I do not seem to be able to, despite having bought the generator.

I am trying to get the dates in for the files. Even though I select "Server's Response" I get the current date.

I am running my own Linux VPS with Apache version 1.3.37 (Unix) and PHP version   5.2

Thanks
Re: Server response Dates same as current
« Reply #1 on: October 21, 2008, 10:08:54 PM »
Hello,

this option works only for static html files, in other cases server doesn't return last-modified date as a response.
You can check http headers that are returned by your server using our headers viewer tool: https://www.xml-sitemaps.com/http-headers-viewer.html
Re: Server response Dates same as current
« Reply #2 on: October 21, 2008, 10:36:52 PM »
Thanks for the reply.

Uhmm, I just realized that many of my files are shtml and those seem not to return a Last-modified date.

Do you you if there is a way I can make them return a Last-modified date?

PS How do i get to post on the Unlimited PHP Sitemap Generator forum?
Re: Server response Dates same as current
« Reply #3 on: October 22, 2008, 10:58:48 PM »
Hello,

as per http://httpd.apache.org/docs/1.3/howto/ssi.html :
Quote
In its default configuration, Apache does not send the last modified date or content length HTTP headers on SSI pages, because these values are difficult to calculate for dynamic content. This can prevent your document from being cached, and result in slower perceived client performance. There are two ways to solve this:

   1. Use the XBitHack Full configuration. This tells Apache to determine the last modified date by looking only at the date of the originally requested file, ignoring the modification date of any included files.
   2. Use the directives provided by mod_expires to set an explicit expiration time on your files, thereby letting browsers and proxies know that it is acceptable to cache them.


Quote
PS How do i get to post on the Unlimited PHP Sitemap Generator forum?
You should use forums username/password sent to you along with sitemap generator download link for that.
Re: Server response Dates same as current
« Reply #4 on: October 23, 2008, 11:35:30 AM »
as per [ External links are visible to forum administrators only ]

Thanks for the info, though I do not really know where to start.

Quote
You should use forums username/password sent to you along with sitemap generator download link for that.

I should have thought of that. I need to read more ... ;)
Re: Server response Dates same as current
« Reply #5 on: December 12, 2008, 12:55:41 PM »
   2. Use the directives provided by mod_expires to set an explicit expiration time on your files, thereby letting browsers and proxies know that it is acceptable to cache them.
I added this to the .htaccess file of a specific folder so that I could get a way around shtml files not showing last modified dates:

  <IfModule mod_expires.c>
   ExpiresActive on
   ExpiresByType text/html "modification plus 60 days
  </IfModule>

The additional headers I got were :
Cache-Control    max-age=4855090
Expires    Fri, 06 Feb 2009 17:05:56 GMT

And the lastmod date and times keep being the current ones with "Use server's response" setting.

Shouldn't XML Sitemaps use the original date and not refresh the date to the current date and time every time it re-crawls?
Re: Server response Dates same as current
« Reply #6 on: December 12, 2008, 09:08:52 PM »
Sitemap Generator uses the date/time provided in "Last Modified" http header.
Re: Server response Dates same as current
« Reply #7 on: December 13, 2008, 07:11:07 PM »
Sitemap Generator uses the date/time provided in "Last Modified" http header.

You mentioned the use of mod_expires as a way to get round the problem of shtml files not having a "Last modified" header. I thought that was because XML sitemaps does not recrawl pages with an future expire date, but that does not seem to be the case. Am IĦi missing something?
Re: Server response Dates same as current
« Reply #8 on: December 14, 2008, 02:32:17 PM »
Normally, dynamic pages do not return last-modified header and that's why they are always set to "current date". The link posted above was just a pointer to a possible solution for SSI pages (not tested though). With PHP scripts it's simpler to do (with header("Last-Modified: "...) function).

Quote
I thought that was because XML sitemaps does not recrawl pages with an future expire date,
Sitemap generator always recrawls the whole site, regardless of expiration header (since older pages are not cached by the generator script).