I am having download feature in my application. Here we can download multiple file as well. I am getting this error - **Failed to load resource:Frame load interrupted in Safari browser while downloading multiple files**
The issue is Only in safari. the download works fine in other browsers(Firefox, Chrome and IE).
I am using anchor tag to download .how to download file using anchor tag <a>
I am having download feature in my application. Here we can download multiple file as well. I am getting this error - **Failed to load resource:Frame load interrupted in Safari browser while downloading multiple files**
The issue is Only in safari. the download works fine in other browsers(Firefox, Chrome and IE).
I am using anchor tag to download .how to download file using anchor tag <a>
Share Improve this question edited May 23, 2017 at 10:27 CommunityBot 11 silver badge asked Jan 16, 2015 at 7:19 Jeevitha GJeevitha G 1,2343 gold badges14 silver badges20 bronze badges 1-
1
Possible duplicate of: stackoverflow./questions/18652750/… the
download
attribute is not supported in Safari. You should fix this on the backend anyways, having the application send a file properly instead of a text response. – mz3 Commented Mar 25, 2015 at 17:54
4 Answers
Reset to default 3I had the same issue with Safari In my case I am creating a svg file and then converts it to a pdf file that's the file I'm downloading it works in other browsers (firefox, chrome) except for safari. (I didn't check this on IE)
The problem with my code was there was missing 'xmlns=http://www.w3/2000/svg'
attribute in the svg
tag this fixed my problem hope this helps you
The anchor tag download attribute does not work in Safari. I am not sure if this error you are getting is related but the download will not work in Safari regardless.
Source http://www.w3schools./tags/att_a_download.asp
You can try this jQuery plugin, which allows you to download files through javascript. I tested it and it seems to work in Chrome and Safari and is tested on all the other major browsers.
I hope this will help. I had the same download issue on Safari with my NodeJS App. This is not a real issue, nor an issue with Safari. Safari was in my case just doing it job.
Explaination
Step #1: When you have an HTTP link (<a></a>
), and you click on it, what is going to happen is a regular HTTP GET
request sent to your server (NodeJS, Nginx or Apache).
Step #2: Then, your backend will serve the Response with your attachment
. I will assume that you have done everything properly regarding the headers; content-type
, content-disposition
, content-content-length
.
Step #3: The browser then receives the response and treat it how it should: I asked for a HTTP Request, I am expecting a HTTP Response.
The thing in NodeJS, is that if you do not send a response.end()
you will get a Failed to load resource: Frame load interrupted
. At the same time, if you do send a response.end()
with or without content, it will replace the content of the page you are triggered the request from.
Solution
What I have found that worked for me was to send in Step #1
a XML HTTP GET
request, meaning AJAX
request, instead of the regular HTTP GET
. This way, the action is being treated in background as a XMLRequest: {'X-Requested-With': 'XMLHttpRequest'}
.
To implement this, you can do it by hand or use a framework like jQuery.
got the same error like above while using an ios cloud app
Solution that worked for me
Install Mozilla firefox from App Store login into webpage for the cloud app using firefox . Worked perfectly