Google starts cross domain read/write via Javascript

Google recently announced that they have ingrained cross domain read/write functionality via Javascript. The functionality has been added to the GData library, and it is currently available only for Google Calender. Developers could earlier work with feeds directly through javascript, but in read-only mode.

Normally, due to security restrictions on browsers like Firefox and IE, javascript can only make Ajax to the same server the javascript file was loaded from. Hence, currently it is not possible to make cross domain Ajax Calls like say, a javascript file on Gyaan Sutra to get data via Javascript from say Google News.

There are a few known methods to get over the problem, using a proxy being the most common. In this method, the javascript calls a proxy server (which is your own server, in our case the Gyaan Sutra server), which in turn makes a call to the Google News server and fetches the data.

Now with the added functionality in Google Calender, I can make a connection to Google, authenticate it using AuthSub (this is the first time authentication can be done via Javascript too), and then fetch data directly via the Javascript.

This would mean less load on your server and more on the client side.

Here is the interview with Google Developer Jun Yang about the same.

Google Code Blog

This entry was tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

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