jQuery 1.5.2 ajax module and local files issue

In the new jQuery 1.5 version the ajax module has been completely rewritten introducing important changes.
One of the most consistent change is that now the $.ajax() call returns a jXHR object that is a superset of the browser’s native XMLHttpRequest object.
As an example the ajax response now contains  the responsetext as well as the getResponseHeader() method and provides consistency to the XMLHttpRequest object across platforms (and allows you to perform previously-impossible tasks like aborting JSONP requests).
But something unexpected happens once I tested my components with this new jQuery version.
All the ajax requests did’t work if run as local file (Ex: file:///Users/pupunzi/DEV/jquery.mb.components/jquery.mb.extruder/demo.html).
That was something I pointed out during the beta testing of this latest release but once the official 1.5 was out the problem still exist.

Getting over again this problem I found out what was wrong: all my ajax requests did’t expressly declarate the dataType attribute when called; this, for some reason, have no default fallback (dataType:”html”) if the request is made from a local file using the v. 1.5 of jQuery but it is resolved correctly once called from a web server.

So, after adding the correct dataType, all the ajax calls now works correctly even if called directly from a local file:

before:

[sourcecode language=”javascript”]
$.ajax({
type: "GET",
url: url,
data:pageData,
success: function(response) {…}
})
[/sourcecode]

after:

[sourcecode language=”javascript”]
$.ajax({
type: "GET",
url: url,
data:pageData,
dataType:"html",
success: function(response) {…}
})
[/sourcecode]

There’s no documentation about this issue on the jquery site and maybe someone will find this information usefull.
For an accurate documentation on the new ajax module read: http://api.jquery.com/category/version/1.5/.