Monday, May 30, 2011

jQuery doesn't suport ajax over the file protocol

I was playing with jQueryUI today, and a simple example like this failed to update an page.

        $.get('data1.xml', function(data) {

Running under Firefox4 locally on a PC (static local file protocols), I get errors like this inside Firebug:

Node cannot be inserted at the specified point in the hierarchy" code: "3

Turns out that this failure only occur when fetching local files because the same code works when deployed and run from a web server. Reading from a bug report here seems to indicate that jQuery AJAX doesn't support local file protocol.

Interestingly, an IE browser works with above code! And also the jQuery's load method like $('#main-panel').load('data1.xml'); works fine with local file!

Saturday, May 28, 2011

Hello World!

Hello World!

This is my first post using "saltnlight5" in BlogSpot.

I am a Java Developer and I have keen interests in software development. I will try to post things I've learned and hopefully they can be a help for those who are looking for the same information.