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. 

Replies

You are reading an archived discussion.

Related Posts

Which is the best website for preparing technical questions during electrical interview?
Scary. But seems possible.https://www.vice.com/en_au/article/wjbzzy/your-phone-is-listening-and-its-not-paranoia?utm_campaign=pockethits&utm_medium=email&utm_source=pocket
China is slowing down on internal solar generation. This may be good news for India.https://qz.com/1298585/chinas-solar-power-slowdown-is-great-news-for-india/?utm_source=YPL&yptr=yahoo