Top 5 Reasons to Avoid Javascript Datafeeds

Webmasters new to affiliate marketing may be drawn to Javascript-based ‘live pricing’, often used in free affiliate template sites provided by merchants. Here are my top 5 compelling reasons to steer clear of Javascript-based live pricing (sometimes called ‘Javascript datafeeds’) whenever possible.

What is Javascript Live Pricing (aka ‘Javascript Datafeeds’)?

Frequently found in free template sites provided by merchants, Javascript-based pricing and product information is made up of three parts:

  1. A data file including pricing and other information about merchant products,
  2. A piece of Javascript software for parsing that data file, and
  3. Individual Javascript statements scattered throughout a web page which call the Javascript routines to extract specific information from the data file

Of these three parts, the first is the closest to being what we would ordinarily call a ‘true’ datafeed. At first glance, Javascript-based pricing and/or product information tables probably sound like a great idea: after all, they free the affiliate from the tedium of having to update pricing or product information manually, and they grab the authoritative information straight from the merchant’s website. So, what’s wrong with them?

Why are Javascript ‘Datafeeds’ Such a Bad Idea?

Here, in reverse order from least important to most important, is my top 5 list why serious affiliates should avoid Javascript-based pricing whenever possible.

Reason 5: Javascript Datafeeds are Less Compatible than Plain XHTML, PHP, or ASP

In order to function at all, Javascript datafeeds require that your visitors be running compatible browsers with Javascript enabled. Remember, just because you might browse with Javascript enabled doesn’t mean that everyone does — and every visitor who arrives with it disabled represents a squandered opportunity. Most sites which rely on Javascript to display prices use the same technology to display product information such as quantity, as well as to generate correctly formatted ordering links; if your site does this, visitors without Javascript turned on will see literally nothing in place of your descriptions, prices, and order links.

The same is not true of plain (X)HTML, which will be rendered in one way or another by every browser (by definition!), or of PHP or ASP, which are interpreted at the server end and provided to the visitor as plain (X)HTML.

Reason 4: Javascript Datafeeds Make Your Site Reliant on the Merchant’s Site

The next reason for avoiding Javascript datafeeds is that they make your site reliant on the merchant’s site: have a look at the source code of any stock free template site using this technology, and you will very likely find a call to the merchant’s website to grab the latest data file. In other words, each time a visitor arrives at your site, their browser will hit the merchant’s site directly for a copy of the data file. Among other things, this means that if the merchant’s site experiences problems of any kind — say, a slow response time or even an outright service failure — then so does yours!

And while you might reason that you wouldn’t be getting any sales anyway during the time the merchant site is down, it’s also true that not every one of your visitors would have been planning to buy right at that precise moment: do you really want to display nothingness to everyone when the merchant site goes down, including those people who might just be browsing but who might otherwise have come back later to buy?

Reason 3: Javascript Datafeeds Yield Slow and Bloated Code

Part of the rationale behind reason number 3 derives from reason number 4: the extra hit to grab a data file from the merchant’s site may slow down the process of loading pages on your own site. But the problem is much more extensive than that…

In addition to loading that extra data file, the browser also has to load all that extra Javascript parsing code, and all that extra code in the page itself to make specific calls to the Javascript routines that parse the data file. Worse, it then has to wait while all those individual Javascript calls get executed to display the relevant information in the right place in your page. In my own experience, I have actually reduced some page sizes by around 85% by stripping out and replacing all the Javascript crud included in a ’stock’ free affiliate template.

Reason 2: Javascript Datafeeds are Extremely Tedious to Update or Modify

Our penultimate reason for avoiding Javascript-based datafeeds is that each individual piece of information which you would like to display on a page using a Javascript datafeed requires a tailor-made call to the Javascript parsing routine; this means that if you decide you’d like to display a different piece of information, you need to replace the Javascript code that inserts it. If, for example, the merchant adds a new quantity of a given product, that new quantity will not be displayed by run-of-the-mill Javascript-based templates: you will have to edit your source code manually to insert the correct Javascript code to display that new information. In the case of merchants who provide free affiliate templates, updates to the product catalogue are ordinarily accompanied by updates to the free templates — which is great, provided you have not devoted any time or effort to customizing your template site to distinguish it from the zillions of other identical template sites being run by other affiliates!

Reason 1: Javascript Datafeeds are Invisible to Search Engines

The final, and most damning, reason why serious affiliates should avoid Javascript-based pricing and information tables is that they are literally invisible to search engines. None of the major search engines executes or even parses Javascript code within web pages; this is done by web browsers, but not by web crawlers. In other words, rather than seeing a product name or a product description — as your visitors would see, if they are running a compatible browser with Javascript enabled and can stand the delay waiting for everything to load an execute — the bots for every major search engine see nothing but Javascript code, which they skip entirely.

Suddenly, your page full of multiple occurrences of product names and relevant product descriptions becomes largely empty space, just coding junk to be dumped into the digital bit bucket by every major search engine.

Conclusions About Javascript-Based Pricing

There are probably some conditions under which Javascript-based pricing or information tables are tolerable — for example, if you are a new affiliate and not yet ready to invest the time and resources to craft alternative solutions. Likewise, there are some steps that affiliates can take to ameliorate some of the problems listed here (e.g., caching the data file locally to reduce reliance on the merchant’s site). But overall, if you’re serious about building successful affiliate sites, these five reasons all suggest strongly that Javascript datafeeds should be avoided like the plague!

This article was last updated on Thursday, 2nd June 2005 at 9:09 pm and is filed in the Affiliate Marketing Basic Tools, Search Engine Marketing section. You can leave a response below.

Feed for this Entry Trackback Address

Bookmark and Share:

There are no comments yet on this article -- would you like to be the first to post a response?

Join the Discussion!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


A valid email address is required to enable you to personally verify and authorize your comment for posting. It will not be displayed in your post or used in any other way. SPAM comments will be deleted immediately.