Auto Datestamps without Javascript

This Page

  1. If you use Java Script
  2. Dreamweaver Insert Date
  3. Front Page Timestamp Bot
  4. Server Side Incude

If you use JavaScript

Although JavaScript can be used to create accessible content, the code must be constructed with care. See the Scripts page for more information

If you wish to include an automatic date generator without JavaScript, the following options are available. All these options add special tags as HTML comments which allows the date to be updated by the Web editor, content management system or by the server.

Dreamweaver Insert Date

Dreamweaver allows you to insert a date in a format which updates itself everytime you save the file in Dreamweaver.

To Insert the Date

  1. Go the the Insert menu and select Date (or choose the calendar icon in the Common tab of the toolbar).
  2. In the pop-up window, select the desired format and check the option for "Update automatically on save."
  3. Save the document and the current date will be displayed. See the example below.

Dreamweaver Auto Date (in military style time)

This file was last saved on - August 8, 2005 15:30

View the Code (Date is not updated)

<!-- #BeginDate format:Am1m -- >February 25, 2004 16:40 <!-- #EndDate -- >

 

Front Page Timestamp Bot

This is similar to Dreamweaver, except that the code inserted is called a Front Page Webbot.
Note: It may be possible to implement this code in Microsoft Web Expression. Check documentation or tutorials for details.

To Insert the Date

  1. Go the the Insert menu and select Date and Time.
  2. In the pop-up window, select the desired format and check the option for "Date this page was last edited."
  3. Save the document and the current date will be displayed. See the example below.

Web Bot (in military style time)

This file was last saved on - 02/25/2004 04:23:45 PM -0500

View the Code (Date is not updated)

<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%m/%d/%Y %I:%M:%S %p %Z" startspan -- >
02/25/2004 04:23:45 PM -0500
< !--webbot bot="Timestamp" endspan i-checksum="38424" -- > </p >

 

Server Side Include (S.S.I.)

You can include a snippet of code which instructs the server to change the date everytime you upload the file. To do that:

  1. Write <!--#echo var="LAST_MODIFIED"-- > wherever you want a date to appear.

  2. Save your file with the .shtml extension to indicate that a server needs to parse a server side include.
    NOTE: Some servers support this extension even if the file type is .html. Test your page or check with your administrator for details. See also the Penn State I.T.S. Knowledge Base for setting up SSI support within .html files in your own directory.

Top of Page