Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Amazon product previews problem

Reply
Thread Tools

Amazon product previews problem

 
 
Ben Straub
Guest
Posts: n/a
 
      01-15-2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Amazon Product API hmac signature? Jonathan Rochkind Ruby 3 09-01-2009 02:17 PM
Problem with Lightroom Standard Previews Steven Wandy Digital Photography 0 02-28-2007 04:11 AM
HEXUS.previews :: nForce4 410 and 430 with GeForce 6100 ... Silverstrand Front Page News 0 09-20-2005 01:24 PM
HEXUS.previews :: S3 Graphics announces Chrome20 series Silverstrand Front Page News 6 09-12-2005 01:44 PM



Advertisments