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!

Order your copy of
The Self-Reliant Entrepreneur

by John Jantsch

“A book that deserves a spot in every entrepreneur’s morning routine.”
—Ryan Holiday, #1 Bestselling Author of The Daily Stoic and The Obstacle is the Way


The Role of Your Website in Guiding the Customer Journey
Today’s customer journey is more complex than ever. From social media to paid search to offline marketing, there are dozens of ways someone can discover your company. The main role of your website in this twisting journey is to be a solid central point. While prospects may discover your brand anywhere, you want to be […]
A Quick and Effective Approach to Facebook Advertising
Facebook remains the dominant social media platform. In a recent earnings call, CEO Mark Zuckerberg shared that there are more than 2.2 billion monthly actives, with almost 1.5 billion using it every day. That means that small business owners who are not advertising on Facebook are missing out on an opportunity to connect with about […]

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.

x

Pre-order your copy of
The Self-Reliant Entrepreneur