Tech Blog

Make sure you always have the current copyright

Make sure you always have the current copyright

Recently updated on

As Web developers we are sticklers for website details. That's why I always look at the copyright year, often found in the footer of a page.

Whenever I go to a website, my eyes go immediately to the year. You'd be surprised how many websites say 2006 or 2002 or even 1999. At best, is demonstrates no attention to details and at worst it proclaims the site as abandoned.

At Imaginary, we have our site and our client sites set up so their copyright date updates at the stroke of midnight on January 1st, automatically. We do it by adding a little bit of simple code into the footer. Again, our footer, showing the invisible commands:

[!--#config timefmt="%Y" --]

Copyright © 1996- [!--#echo var="DATE_LOCAL" --] Imaginary Landscape, LLC. All rights reserved.

The two commands do the following tasks:

[!--#config timefmt="%Y" --]- until otherwise told, return a four digit year for any DATE requests

[!--#echo var="DATE_LOCAL" --]- show the local DATE

This simple snippet asks the local Web server every time a page is called, "Hey, what year is it?" Assuming the server is on the correct time, it will forever display the current year.