HN2new | past | comments | ask | show | jobs | submitlogin

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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: