07 Jun 2018

Is file download over Ajax call supported?

I'm reading that file downloads over ajax call isn't supported by modern browsers. There seems to be a security risk associated with it; and I'm curious to learn more. Here's the scenario I'm currently working on -

  1. User clicks on the 'Download' button
  2. An ajax call is made to the server. The server then looks for the file on CDN (which uses a 'data' subdomain). 
  3. Server fetches the file locally and serves it to the user. 

But this doesn't really work. I'm looking for reason 

Would really appreciate if someone could explain this a bit in more detail. Thank you in advance. 

Be the first one to reply

Share this content on your social channels -

Only logged in users can reply.