Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QUESTION: How do you configure Apac

Status
Not open for further replies.

gnubie

Programmer
Apr 16, 2002
103
US
QUESTION: How do you configure Apache to return the Last Modified Date in the HTTP response header (for the request of a pure HTML page).

BACKGROUND: Using the JavaScript code snippit:

Code:
<script type=&quot;text/javascript&quot;>
document.write(&quot;Updated: &quot;,document.lastModified);
</script>

Netscape returns: January 1, 1970 (beginning of Epoch) and
IE returns the current date/time.

It has been explained to me that this is because Apache is not returning the Last Modified Date in the HTTP response header. My ISP claims it can ONLY be done with for .shtml files. Discussions on the Internet claim the LMD can be configured to be returned for any pure HTML, BUT they didn't say how. I would like someone to tell me how so I can tell my ISP.

Thanks,

Gnubie



 
Problem solved.

Apache normally returns the Last-Modified date in the HTTP response header. The problem is that I was using an
Code:
.htaccess
file which contained the line:

Code:
AddHandler server-parsed .html .htm

The AddHandler line is used to enable Server Side Includes for .html and .htm files. Apache normally does not return the Last-Modified date for SSIs.

So -- that was the cause of no L-M returned. Why Apache behaves that way, I don't understand.

QED
 
That may have been the thinking, but IMHO it would have been better to return the Last Modified date anyway. I contend the client wants to know the date of the file on the server, regardless of whether it generated and served a web page or was just a plain web page.

Gnubie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top