Error callback due to page reload only called in jQuery 1.x, not 2.x

by pmorch

HTML

<div id="result">Running AJAX request...</div>
<a href="http://www.morch.com">link somewhere - click me to force an error due to page (re)load</a><br>
...in jQuery 1.9.1, but not in 2.0.2 (change jQuery version in jsfiddle under "Frameworks &amp; Extensions")

JavaScript

$.ajax({
    type: "POST",
    url: "/echo/json/",
    data: {
        json: JSON.stringify({
            foo: "bar"
        }),
        delay: 30
    },
    cache: false,
    success: function (json) {
        $('#result').text(JSON.stringify(json));
    },
    error: function () {
        alert("error callback called");
    }
});