Forum Moderators: phranque

Message Too Old, No Replies

last-modified-date FROM SERVER

How do you make Server deliver it?

         

jbgilbert

3:58 pm on Oct 13, 2003 (gmt 0)

10+ Year Member



Below is a quote from a closed thread. I need detail on how to do what it says.

I have virtually hosted sites on Apache OS that apparently show NO "last-modified-date" from the server and I need to make that happen. HOW DO I DO THIS?

"You don't need to do anything to your pages to use "If-modified-Since", you just need to make sure that what ever web server your on supports it. When the page request is sent to the server it includes the date the robot last saw the page, the server checks the date and if the page has been modified since sends the page, if not it sends a 304 (Not modified) response. "

RonPK

5:56 pm on Oct 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do the sites have SSI enabled?

jbgilbert

6:57 pm on Oct 13, 2003 (gmt 0)

10+ Year Member



RonPK,

Yes they do.

More research is telling me that this can be done in the .htaccess file using some form of "setdateheader".

I've found this, but can't figure out how to get it in the .htaccess file properly?

setDateHeader
public void setDateHeader(java.lang.String name,
long date)Sets a header by

long now = System.currentTime();
response.setDateHeader("Expires", now + 15000);
Specified by:
setDateHeader in interface HttpServletResponse
Parameters:
name - name of the header
date - the date in milliseconds since the epoch.

RonPK

8:51 am on Oct 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're using Apache and SSI, you should make sure you have the 'XBitHack' directive set to 'full'. If set correctly, Apache will send the Last-Modified header.

It's all in the manual ;) [httpd.apache.org...]