Automate Copyright Updates on Web Pages

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 web site.

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();
yr=d.getFullYear();
if (yr!=xxxx)
document.write("- "+yr);
/script

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!


Why You Should Focus on Designing an SEO-Friendly Website (And How to Do It)
Your website is the heart of your online marketing efforts. So it stands to reason that it should be built with marketing, rather than aesthetics, in mind. Yes, there is something to be said for having an appealing website, and you should certainly aim to design one that has both form and function. But the […]
Four Tips for Creating a Website Users Trust
It seems like every day we’re hearing about a new online security breach. From mega-retailers like Target to tech giants like Facebook, online security is a major issue and giant concern for consumers. Building trust is a critical part of the marketing hourglass for any business, whether they’re a global conglomerate or a mom and […]

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.

Grab 7 Steps To Marketing Success

This eBook has been downloaded and used by thousands of business owners and marketers to use as a blueprint for marketing success. Start building your marketing system today!
x