Detect "download event"

0

I'm providing a link to download XML files:

<a href="http://exemplo.com/link" download="">
   Baixe o XML do pedido
</a>

However, because it is a bit slow processing due to the number of functions needed, I would like to put a loading on the page so that the user does not have the feeling that nothing is happening. Because clicking several times, the download is also done several times ...

As far as I know, there is no downlaod event, but I just need to simulate this behavior, so I can close loading at the time the download actually happens.

The loading that I mean would be simple, I do it myself, my question is really to simulate the event.

I would like to make the solution as simple as possible without using any plugins.

    
asked by anonymous 18.11.2016 / 12:13

1 answer

0

See if this helps:

link

Using cookies and GET / POST

There is also a plugin plugin though I'm not much of a fan of using plugins for this sort of thing.

    
18.11.2016 / 14:54