NATHAN ASHBY-KUHLMAN > Blog Entry

Don't 'include' content with JavaScript

To cover the war with Iraq, many news sites are using an automatic feed of the latest stories from the Associated Press wire. But on some of those sites, readers without JavaScript or with JavaScript turned off simply cannot see the lead stories. Not only is this journalistically unacceptable, it makes these sites look downright silly.

Here are three news sites where most of the content in the lead front page package disappears for visitors without JavaScript (at another, all Iraq content disappears). Use the “with JavaScript” and “without JavaScript” links to switch between screenshots of these sites earlier this morning — both as the designers intended and as they will appear to the approximately 9 percent of Web readers without JavaScript.

At the Las Vegas Review Journal, the “Latest News from the Associated Press” is nowhere to be found:

Screenshot: with JavaScript · without JavaScript
A screenshot of the 'Operation Iraqi Freedom' section of lvrj.com; with JavaScript turned off there are no Associated Press headlines as the site claims.

At The (New York) Journal News, the only “War with Iraq” news appears to be a set of editorial cartoons and a Baghdad time clock that doesn’t work:

Screenshot: with JavaScript · without JavaScript
A screenshot of the 'War With Iraq' section of nyjournalnews.com; with JavaScript turned off there is a big blank space.

And at Tampa Bay Online, the lead photo is missing and there is no “ongoing coverage from the wire”:

Screenshot: with JavaScript · without JavaScript
A screenshot of the 'Operation Iraqi Freedom' section of tbo.com; with JavaScript turned off there are no Associated Press headlines and no photo.

These three sites have this problem because they try to have the user’s browser “include” the latest headlines directly from one of the AP’s servers. These sites need to program their own servers to regularly download the AP’s latest Iraq headline for server-side inclusion, rather than relying on the JavaScript. If programmers cannot deliver on basic journalistic needs like that, the Web editors could at least include a useful <noscript> section of HTML, such as a link to a separate page with those headlines:

<script type="text/javascript" src="http://customwire.ap.org/lineups/IRAQ-bulleted.js"></script>
<noscript><a href="http://customwire.ap.org/lineups/IRAQ-bulleted.html">Iraq news from the Associated Press</a></noscript>

I’m sure there are many other news sites that use these Associated Press JavaScript files inappropriately. While you’re looking at screenshots, though, I also need to single out a major site that uses JavaScript for a different purpose — to rotate several photos onto its front page. Without JavaScript, there’s no photo at all displayed at the Washington Post:

Screenshot: with JavaScript · without JavaScript
A screenshot of the 'War in Iraq: Special Report' section of washingtonpost.com; with Javascript turned off there is no photo.

The fact that most people do have JavaScript turned on is no excuse for news sites to look stupid to those people who don’t.

POST A COMMENT on “Don't 'include' content with JavaScript”

Your name: (optional)

Your site: (optional)

Comment: (only <a>, <em> and <strong> allowed)

This page last modified on Sunday, January 15, 2006 at 8:58 pm