The use case is simple, you have /reports/593874951.pdf
on your web server and want to let your user download it — and if possible with a meaningful name.
In the past, you may tried using the Content-Disposition
HTTP header to achieve this, but today, with Safari getting the support for the download
attribute it’s going to simplify a lot of things.
Using the download
attribute is simple as pie:
<a href="/reports/593874951.pdf" download="report.pdf">
Download report