Hacker News new | ask | show | jobs
by pgreenwood 453 days ago
This is quite cool, but I am not sure I understand the difference between 'Save' and 'Share'. They both seem to just save a file.
1 comments

Save uses an a href (link) with download attribute (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#...), which will usually trigger a normal file download.

Share uses Navigator.share (https://developer.mozilla.org/en-US/docs/Web/API/Navigator/s...), which should invoke the browser’s “share” menu if it has one.