How to make Safari download a file without the "Failed to load resource: Frame load interrupted" error

115 Views Asked by At

A jQuery ajax post request is used to fetch and download a file.

The response to fetching the document has content-disposition header set to attachment; filename=example.csv.

On Safari, the request is causing the following error: Failed to load resource: Frame load interrupted.

The document is downloaded correctly, but because of this error, the status property of the jqxhr response object is set to 0. Because the client code is using this status code to determine if a network error has occurred, the client code behaves as if the download failed.

How can I avoid Safari raising the Failed to load resource: Frame load interrupted error?

0

There are 0 best solutions below