Thursday, January 12th, 2006

JAHAH – Cross-Domain JS Library

Category: Library, Remoting

With all the recent excitement about crossdomain Javascript, it was perhaps inevitable that libraries would emerge to automate the process. David Janes has produced one such library: JAHAH. The name comes from AHAH, which we posted about earlier.

Amongst its features:

* It is easy for web page authors to include JAHAH documents
* It is easy for content producers to create JAHAH documents
* JAHAH documents can be included “cross-domain”, unlike most AJAX technologies (without bridging)
* JAHAH documents are search engine friendly

The package comes with several Python JAHAH webservices:

* jahah-include — extract the body or a fragment of another document and return it as a JAHAH document
* jahah-feed — convert an RSS/Atom feed into a JAHAH document.

All JAHAH webservices must have a fallback mode into AHAH, making these tools useful in that environment also.

Code usage:

Automatically load by magically marked hyperlinks

<script type="text/javascript" src="jahah.js"></script>
...
<a rel="include-jahah" href="http://www.example.com/jhah-service/">loading...</a>

Load a JAHAH document into a element (by ID)

<script type="text/javascript">
loadJSONDoc("http://www.example.com/jhah-service/", "element-id")
</script>

JAHAH is apparently the first library to support JSONP, allowing the caller to influence the Javascript that will be output by the remote server.

Posted by Michael Mahemoff at 7:50 am
5 Comments

++++-
4 rating from 42 votes

5 Comments »

Comments feed TrackBack URI

Cool stuff. They say it is search engine friendly but it seems to require javascript on the client in order to inject the remote html. How is that search engine friendly? Maybe I am missig something?

Comment by Dean Fragnito — January 12, 2006

OK, let’s try again [a little problem with comments earlier].

All JAHAH webservices must fallback to HTML if the ‘jsonp’ parameter is not present. The include is done by an A tag marked rel=”include-jahah”. Because this A tag is converted to the include (JAHAH) document at viewtime in the user’s browser, non browser users (i.e. search engines) will see it as a normal HTML document,

Comment by David Janes — January 13, 2006

respeced sir/madam

i want to know about WORK LIFE BALACE ,,,as i am doing a project on this . can u provide some material on this topic..

thanking u

Comment by harsh — February 19, 2006

Where to download jahaj.js

Comment by Bob — August 3, 2007

Where is a download button?

Comment by sdh1129 — September 2, 2008

Leave a comment

You must be logged in to post a comment.