Automate Copyright Updates on Web Pages
Find a Consultant Become a Consultant

Automate Copyright Updates on Web Pages

Automate Copyright Updates on Web Pages

By John Jantsch

Nothing earth shattering today, but a nice little new year item for your website.

Many web pages carry copyright notice that reflects the creation date of some or all of the content – Copyright 2003-2009 for example.

This is great until the year changes and you need to go back and update all your web pages. You can and should make this function easier with the use of footer library files or SSIs, so you only need to update once place and have it cross all your pages. But, you can even take it a step further and have the date change automatically.

Most blog themes have this function using a simple PHP call – Copyright © 2003-< ?php echo date('Y'); ?> – this would produce Copyright 2003-2009, and change to 2010 automatically next year.

You can also accomplish this with a simple javascript command placed in a footer file or anywhere on a web page where you want your copyright notice to show up.

Copyright © xxxx
script language="JavaScript"
var d=new Date();
if (yr!=xxxx)
document.write("- "+yr);

Add <> around script language=”JavaScript” and /script

Replace the xxxx in both places with the year you would like to publish as the start year and then the script will take care of the rest. So for me it’s 1999 and looks like this Copyright © 1999 – 2009. Again, this will change to 2010 next year at this time without any effort on my part.

I’m sure there are a dozen other ways to get this done, but now you know it’s possible!

Free eBook 
7 Steps to Scale Your Consulting Practice Without Adding Overhead

The Duct Tape Marketing Consultant Network has helped me to grow my business by over 40% in the last 12 months. ~ Michael Quinn - Michael Quinn Agency, Fargo, ND

5 Tools to Make Your Email Smarter, Faster, Better
I believe that email is with us for a while longer. Despite the attempts of well-meaning app makers and social networks, email is not dead. In fact, I get a ton of email from those same social networks that were going to kill email off. Email, like it or not, is the one tool that […]
How to Put Your Website At the Center of All Your Marketing
Your website is the heart of your online marketing presence. It’s the one place on the internet over which you have full control of visuals, messaging, and content. Everything else that you do online should drive visitors to this website. But that’s just it, there are a lot of other online channels to consider, from […]

Subscribe to the Duct Tape Marketing Podcast

If you know your small business needs marketing, but don’t have the time or resources, look no further. The Duct Tape Marketing podcast covers everything from earning referrals to managing time and being more productive.