Google gadget – Intranet feed reader

Few months ago, I had a chat with my colleagues about dashboards. How useful it would be for developers if they have a [tag]dashboard[/tag]? – a centralized source of information that they need for day-to-day work (i.e. assigned issues in the bug tracking system, modifications in the company’s wiki, changes in the version control system etc.). We’ve also noticed that [tag]iGoogle[/tag] ([tag]Google Personalized Homepage[/tag]) was becoming more and more popular. It could have been the ideal dashboard. The problem was that all our systems are accessible only from intranet and there was no [tag]gadget[/tag] that could read/display them. In this blog I am going to show an [tag]intranet[/tag] [tag]feed reader[/tag] that overcomes these issues.

Problem 1 – gadget API

Google Gadgets API cannot fetch intranet feeds (even if the gadget runs on a browser inside the intranet, Google uses its own servers to fetch and process the data as can be seen in Figure 1.)

Google gadget intranet feed reader - problem

Figure 1. Google gadget – intranet feeed reader – request flow.

Solution 1 – javascript library

Use third party library to fetch the data, this means that the request will be issued from our browser (instead of Google’s servers). Another solution would be to use gadget with content of type ‘url’ pointing to some intermediate (proxy) server that renders the whole gadget.

Problem 2 – cross-domain scripting

If some third party library is used (like jquery, prototype, dojo etc.) for content fetching we’ll run into cross-domain scripting problem (the gadget is served by Google, our feeds are on our intranet) Browser doesn’t allow ajax calls to different domains. How to avoid the same-origin policy?

Solution 2 – jsonp

Following options are available:

  1. Make the feed output jsonp instead of XML (this can be done if we have control over the feed)
  2. use flash to fetch the feed
  3. use a local proxy, in this case a xml2jsonp proxy
  4. digitally sign you scripts – works only in Firefox
  5. (cross-document messaging in upcoming HTML 5.0)

I’ll focus on the third option. Following figure gives an overview of the request flow:

Figure 2. Google gadget – intranet feeed reader – solution – using xml2jsonp proxy.

As can be seen in Figure 2. the client retrieves the gadget and then issues a JSONP cross-domain request. Browser allows it because in this case it is an ordinary <script> request that isn’t restricted by the same-origin policy.


This gadget can be found here. You can copy the URL and add it to you iGoogle page (go to gadget directory, click on ‘Add feed or gadget‘ and paste in the URL). It was developed and tested with Firefox browser.

Figure 3. Example screenshot.

Basic implementation of the xml2jsonp proxy server can be found here. The code has dependencies on JSON library and Apache Commons Http Client library.

Security considerations

Gadget source code is retrieved from Google servers (or you can host it yourself for more control). All further communication is done within intranet. It is susceptible to all threats as any other intranet traffic. You can view the source code of the gadget and make sure that it is not sending your data where is shouldn’t be.

If feeds require authentication the gadget has to be configured with this information (cookies, url parameters). Please note that when the page on which a gadget appears is viewed, a request is sent to Google’s servers that include the gadget’s URL and the gadget preferences selected, as well as the URL of the page.


The intranet feed reader gadget can be used as part of a developer’s dashboard. It can display any intranet feed. Most useful might be information necessary for day-to-day work (e.g. current assigned issues in the bug tracking system, changed resources in company’s wiki or version control system).

Update (27. May 2008):

Mihailo Lalevic ported this Intranet Feed Reader to Firefox  – as a Firefox add-on. More information can be found in his blog.

Screenshot of Intranet Feed Reader in Firefox as a Firefox add-on.
Figure 4. Screenshot of Intranet Feed Reader in Firefox as a Firefox add-on.

, , , , , ,

  1. #1 by Brendan Lawlor on May 21, 2008 - 1:56 am

    That’s a really excellent post. The trouble with dashboards that are commercially available is that they come packed with other functionality (like wikis, blogs etc) and therefore cost too much. The Beauty of RSS in the workplace is that it’s a standard language that can blend the output from a whole range of diverse applications. All that should be needed to dashboard that is a very thin layer on top. It would be interesting to see if this could be turned into a system where we can set up company-required feeds that all employees would receive, alongside custom feeds that employees choose for themselves.

    Nice one.

  2. #2 by Mihailo Lalevic on May 21, 2008 - 1:07 pm

    Hi Michal,
    Good stuff!
    Thought about Google Desktop or Firefox add-ons as well?


  3. #3 by Michal Bali on May 21, 2008 - 2:18 pm

    Hi Mihailo,
    Nice idea! I guess you wouldn’t have the problem with browser’s “same-origin policy”, so any feed reader gadget/add-on will work. Assuming that you want to install Google Desktop or use only Firefox.

  4. #4 by Sidar Ok on May 28, 2008 - 1:58 am

    Good work Michal, that’s a nicely put example of processing RSS . This can easily turn into similar implementations as this opens the door.

    Thank you for putting this together.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: