Getting started with the OpenLinkz search widget - read these posts and get up and running

Setting up OpenLinkz OpenLinkz Simplified Changing Appearance of Links OpenLinkz Cheat Sheet

Again! More cross-domain problems with stock quote widget

I had a bunch of trouble toward the end of last week with my live stock quote widget that retrieves stock prices from Yahoo every 30 seconds throughout the day.

Having run into problems with the WidgetBox proxy service that allows widgets to retrieve data from other domains I had converted the widget into a Google Gadget. I then wrapped the Google Gadget within the WidgetBox widget so all those folks who were using the WidgetBox widget wouldn't be left with a non-functioning widget.

Last week, the Google Gadget began acting up. Using FireFox and Firebug, I was able to determine that the response from Yahoo in a simple CSV format was still functioning properly but the callback wasn't being executed within the gadget to actually read the response. I use the simple _IG_FetchContent function to execute the request and process the response.

In my experimenting, I discovered that using a Yahoo Pipe and rendering the output as JSON worked perfectly. Still, this seemed like too much overhead for such a simple request.

As it turns out, I had to make an adjustment to the URL at Yahoo that is used to request the stock price data. Where previously I used the following URL:

Now I have to use this URL:

If you type these URLs into your browser (with the requested symbols and request parameters), both of them would return the requested data. I can only think that some kind of redirection was taking place on the Yahoo site that made the Google Gadget function reject the response.

In summary, it seems these cross-domain calls can be awfully touchy. I apologize to any users who experienced an outage as a result of the problems in this widget. Hopefully, both Yahoo and Google will avoid making any changes for a while.

Posted by TradeRadarOperator at 10/20/2008 10:18:00 PM 0 comments  

Support our sponsors!
Close this ad panelX