Amazon product previews problem

B

Ben Straub

Hello. The Intargoogle has failed me, and I'm hoping for some guru
insight. I'm not sure if these are the right places to post this, but
here goes.

I'm writing a small wishlist application in Rails, and I'm trying to
incorporate Amazon Product Previews (see the demo here if you don't
know what this is: http://www.tictap.com/tca). I'm able to recognize
amazon product links (the regex isn't too hard) and insert my
referrer-id, but the script-include that Product Previews is generating
a raft of requests to my mongrel server. Here's the snippet I inserted
just before the </body> tag on all my pages (as per the amazon
documentation):

---------------------------------------------
<script type="text/javascript"
src="http://www.assoc-amazon.com/s/link-enhancer?tag=mytag-20">
</script>
<noscript>
<img src="http://www.assoc-amazon.com/s/noscript?tag=mytag-20"
alt="" />
</noscript>
---------------------------------------------

Looking at my log, I see lots of lines like this:

---------------------------------------------
Processing PeopleController#function (property) { var results = [];
this.each(function (value, index) {results.push(value[property]);});
return results;}
(for 127.0.0.1 at 2007-01-12 08:54:36) [GET]
Session ID: 460f7da5266f6c1e87653c2ddf903023
Parameters: {"action"=>"function (property) { var results = [];
this.each(function (value, index) results.push(value[property]);});
return results;}", "controller"=>"people"}
---------------------------------------------

This indicates that the browser is sending a GET for a javascript
anonymous function declaration to my server. WTF? Oh, and I've tried
serving a static HTML page with Apache with the same script-include,
and my log doesn't show the dozens of "function ..." requests.

Any ideas? I can try to recognize the requests and simply deny them,
but that still leaves the browser waiting for 80-some round trips to
the server before the page is finished loading.

Thanks in advance,

-- Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top