A Little Code Strategy You Should Know To Save You Money

By shingo | September 7, 2009

More often than not, Internet Marketers and organically grown 100+ pages monster sites have hundreds of static web pages that needs its copyright year in the footer updated.

Here is a simple piece of code that automatically updates copyright years. Just place this code once and that takes care of it every year.

Copyright ©
<script type="text/javascript">
var startYear=2009
var d=new Date();
yr=d.getFullYear();
if (yr!=startYear) {
   document.write(startYear+"-"+yr);
   } else {
   document.write(startYear);
}
</script>
Your Site Name

There you have it. It should look like the copywrite notice in my footer below.

The reason I’m sharing this with you is that, one of my customers asked me to update the copyright year on his entire site. I told him that he could have saved money hiring me updating all of his 152 static HTML pages.

You can see the live action in the footer of this blog as well.

Enjoy :)

DeliciousFacebookDigg
RSS FeedStumbleUponTwitter