It's the last day of the year when you realize that the copyright date on your website needs to be changed. And, if your website merely constitutes a handful of pages, updating the copyright won't be all that difficult or time-consuming.
On the other hand, let's say you have a website with numerous pages. Or worse, several websites with numerous pages. Needless to say, changing the copyright date here, there, and everywhere would equate to a labor-intensive, time-consuming task.
And let's face it. That's definitely not something you would look forward to, especially when you'd prefer to be out there enjoying a New Year's celebration.
Fortunately, there's a method that takes all the work out of updating your web pages. It's called dynamic content and here's how it works.
So now that we've talked about it in general terms, here are the exact instructions for setting this up, step by step.
Open a new document in Notepad (or a similar plain text editor) and type in the following:
The x's are the actual content you want to appear on your page. For example, "Copyright 2000-2003". Be aware, however, that there can't be even one extra space in whatever you insert there. Just to be safe, you might want to turn off the word wrap feature to make certain the "document.write" is on one continuous line from start to finish.
When you're done, save the document. If you can't save it as copyright.js, not to worry. That can be accomplished through FTP when the file is uploaded to your web server. For right now, you can just save it with a .txt extension.
Now let's review all the steps.
1. Type (or copy and paste) the document.write command shown above into a blank Notepad document.
2. Replace the x's with your actual copyright information (i.e., "Copyright 2000-2003").
3. Turn off "word wrap" to make certain there are no extra spaces or line breaks.
4. Save the document using a .txt extension for now.
5. Upload both documents (the HTML page and document.write file) to your web server directory via FTP in ASCII mode.
6. Change the .txt to a .js extension.
Assuming all went according to plan, you now have a system in place that will save you a whole lot of time and effort. And when the last day of this year rolls around, you can simply input the new date in your copyright.js document, upload the new version to your server, and you're done!
And while everyone else is scrambling to manually change the copyright date on each and every page of their website, you'll be out enjoying all the New Year festivities.
Now, that's dynamic! ;-)
Feel free to use the above article in its entirety. All I ask is that you include my "About the Author" resource box. Thanks. Maggie Lietz
For your convenience, we provide copy-and-paste versions of this article in both HTML and plain text (opens in a separate browser window).