jquery.fileDownload icon indicating copy to clipboard operation
jquery.fileDownload copied to clipboard

Exception instead of failCallback on Chrome when server offline

Open zunou opened this issue 12 years ago • 2 comments

Enviroment: $.fileDownload v1.4.1, Chrome 27.0.1453.116. code:

$.fileDownload(url, {
    data: data,
    httpMethod: type,
    successCallback: function () {
    },
    failCallback: function (response) {
    }
});

If the server which url was specified is inaccessible (for example turn off local IIS/Apache) then the plugin will be infinitely waiting for a response and filling the browser's console with tons of errors: "Blocked a frame with origin 'http://localhost' from accessing a frame with origin 'null'. The frame requesting access has a protocol of "http", the frame being accessed has a protocol of 'data'. Protocols must match."

I believe that the reason of such behavior is this WebKit's bug: https://code.google.com/p/chromium/issues/detail?id=17325

zunou avatar Jul 05 '13 14:07 zunou

I actually reproduce this bug even if the server is online but reply an error, for example 400 (bad request) or 404 (not found).

avandecreme avatar Aug 16 '13 18:08 avandecreme

This error occurs only when the httpMethod is set to 'POST'.

gvas avatar Aug 27 '13 11:08 gvas