Washingtonpost.com Relying on Client-Side Copyright Details

Posted on Thursday 6 April 2006

I thought this was universally decided to be really bad practice a long time ago. If nothing else, at least back in Y2K, when there were lots of instances of web pages showing crazy dates in certain browsers. Doing it this way just seems unnecessarily complicated and fragile, and, sure enough, I only noticed because it wasn’t displaying right for me on my Blackberry.

I was reading the Washington Post’s summary of Apple’s new Boot Camp program for running Windows on an Intel Mac. Interesting. Boot Camp isn’t enough to make me buy a Mac again, but it’s still an interesting move. But anyway. I was reading that article on my Blackberry, and noticed that at the bottom it claimed it was “Copyright 1996 – The Washington Post Company”.

Well, that doesn’t sound right.

When I got back to a computer and checked the page’s code, sure enough, they’re using client-side Javascript to stick the current year in there:

&copy; Copyright 1996-<script type="text/javascript">document.write(new Date().getFullYear())</script>
The Washington Post Company

And sure enough, that’s going to break on any device that doesn’t do Javascript or has Javascript turned off. Say, cell phones, search engine spider bots, etc. And if the viewer’s local clock is set wrong, they’ll have the wrong copyright statement on all their web pages.

It’s just a little surprising to me that they’re doing something like this, rather than letting their web server automatically put the right year in there, which is what pretty much everyone else does. Especially after all the crazy years that were showing up in people’s browsers around Y2K. I thought that was the lesson to every webmaster never to rely on doing it this way.

So, just odd. That’s all.

No comments have been added to this post yet.

Leave a comment

(required)

(required)


Information for comment users
Line and paragraph breaks are implemented automatically. Your e-mail address is never displayed.


RSS feed for comments on this post | TrackBack URI