Blues Tester Blues Tester - 1 year ago 83
HTML Question

Force file download once a site is visited

I have a simple site and an external file link. I want this scenario to be implemented:
Once a user visits, a file from an external link is automatically downloaded.
Mind that I don't want a user to click some link, but just an immediate file download once the site is visited. Thus

<a href="link/to/file" download>Download</a>
is not what I need.
Thanks in advance.

Answer Source

Simply create a link and click on it via js:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download