Click to See Complete Forum and Search --> : Last mod date


florida
12-31-2003, 01:09 PM
My JavaScript doesnt always print the correct Last Modified Date on my HTML Web pages. Sometimes it works and sometimes it doesnt where it prints "12/31/1969". I have many pages on Solaris and Windows 2000 servers. I assume I should use server side software instead to get this to work.


For what it is worth here is how I have it in JavaScript:

<script language="Javascript">document.writeln("Web page last modified
+ on " + document.lastModified.bold())</script>

I am trying to find out how I could do it with SSI. Please advise how I can do it and note that I have never used SSI.

Thanks

AdamGundry
12-31-2003, 03:10 PM
You will need to make sure SSI is enabled on your server, and will probably need to rename your files so they will be parsed by the server (normally using the extension .shtml). You can then use this:

<!--#echo var="LAST_MODIFIED" -->

For more information, check out http://www.htmlite.com/SSI006.shtml

Adam

florida
01-02-2004, 06:04 AM
Thanks for all the info but it doesnt seem to work. Also how do I find out if SSI is working on our server? I know we are using it for some other stuff but not sure how to check if we have it.

Here is the shtml page I am calling mypagehere.shtml:


<html>
<head>
<title>Untitled</title>
</head>

<body>
<!--#flastmod file="mypagehere.shtml" -->
<!--#echo var="LAST_MODIFIED" -->
test
</body>
</html>

The above doenst print any Last mod date, it just prints "test". I also tried the full URL:
<!--#flastmod file="http://www.here.com/directory/mypagehere.shtml" -->

but still didnt work. I am using Netscape 4.77 and IE 5.5 with IIS and Windows 2000 and Windows NT servers. Please advise.

AdamGundry
01-02-2004, 08:31 AM
I'm afraid I'm not very familiar with IIS, I normally use Apache, so I can't help tell you how to enable SSI. You could try consulting the documentation to find out how to enable it - as far as I can see, your code is fine. Alternatively, SSI may be enabled but with a different file extension - again, check your server.

Adam