Javascript Redirect through HTTP POST

by Scott Jangro on 23 June 2006

One of the major issues with CJ’s new Javascript links is that they prevent affiliates from sending traffic through local redirects. This is a very common method used for tracking and link abstraction. It is, after all, the method upon which traditional affiliate and other tracking links are based. I use local redirects extensively in just about all of my websites and is described by many affiliates documenting their concerns with CJ’s new links.

When I heard what was coming last month, the redirect issue came to mind as a big problem. I did some searching and experimenting to determine how to redirect through a HTTP POST request (which is what’s behind the Javascript links).

The only method I could devise is to load a page in the user’s browser that automatically submits a form via Javascript when the page loads. If the user does not have Javascript enabled, the page will not redirect automatically.

I will say that I don’t like this solution very much as it requires Javascript, has a visible delay when JS is supported, and requires extra coding. But since I’m complaining about LMI so loudly, I’m trying to be as informed as possible about all of the options and workarounds.

Here’s an example and doucmentation of the this method: Javascript Redirect with POST (redirects to ebay after a delay).

Note, there is an artificial delay on this page with a timer so you can stop it and view the page. Hit the red stop timer button first, then you can read the page. Otherwise, the page will, after the delay, perform a redirect through an affiliate link to ebay.

Also, as far as I know, CJ has not stated publicly that this is an acceptible method, but they have indicated that they will have a redirect solution for database driven websites. This is the only way that I know of to do it.

blog comments powered by Disqus