Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Voices That Matter

  • Print
  • + Share This
From the author of

From the author of

Using the Last Modified (ID) Action to Insert a Page Last Modified Timestamp

Just as GoLive 6 includes an action to add the current time and date to a page, there is also an action to include the date on which a page was last modified. Although this date doesn't change after the page is loaded, it still enables you to add a customized element to your page that is very useful for your site's visitors. GoLive includes a Last Modified date object in the Smart Objects palette that offers essentially the same features; it can be updated, however, only when the page is edited and saved within GoLive. If you hand the page off to someone else who uses a different web authoring program to edit it, the date won't update properly. The Last Modified (ID) action gets around this by utilizing client-side JavaScript to update the date regardless of the tool being used to author the page.

  1. Follow all the steps for creating a timestamp, but instead of applying the Clock/Date (ID) action to the head section, apply the Last Modified (ID) action. If you're still following along from the last part of the project, just click the head action and select Last Modified (ID) (it's in the Message category) rather than Clock/Date (ID).

  2. Fill in all the necessary action parameters in the Head Action Inspector.

  3. Save your file and preview it to view the new stamp containing the date the page was last modified. You may need to upload the file to your server to see the correct modification date information.


    If you want to include both actions on the same page and utilize a CSS style to control their formatting, you need to create two separate and uniquely named ID styles to apply to each stamp.

    Figure 11 Setting up a Last Modified (ID) action to display the page's last modification date.

    Figure 12 Previewing the last modified date in a web browser.

Because this action reads the Last Modified property sent by the server hosting the page, you may need to upload the file to a server to generate the correct date on the page. The Last Modified property is a property that the server generates, and it reflects the time and date that the page was last uploaded.

Viewing the page on your local drive works on some platforms and browsers, but for others you need to view it remotely from a server to ensure that the correct modification date appears.

  • + Share This
  • 🔖 Save To Your Account