Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Test case for a possible bug with JQuery 1.5
<!DOCTYPE html>
<meta charset="utf-8">
<pre id="output"></pre>
<script src=""></script>
var out = $('#output');
type: "GET",
url: 'response.html',
success: function () {
console.log('success ', arguments);
error: function () {
console.log('error ', arguments);
complete: function (xhr, status) {
if (status === 'error' || !xhr.responseText) {
else {
console.log('complete ', arguments);
Copy link

johnhunter commented Feb 21, 2011

When loaded from the filesystem (file: protocol) the error event is fired despite the correct response being received. The complete handler's status is an empty string. This behaviour differs from JQuery1.4.x

Copy link

johnhunter commented Feb 25, 2011

Confirmed fixed in JQuery 1.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment