Features of web share API:
- Capable of sharing URL, plain text or files.
- Native, user-friendly and user-customized share dialogs.
- Less code and OS managed UI. (Developer doesn’t need to handle dialog manually)
- Wide range of sharing options. (Developer doesn’t have to worry about.)
Limitations of web share API:
- Supported only on specific browsers and devices. (Advised to add a fallback to prevent compatibility issues)
- Available only via HTTPS.
- To prevent mishandling, It can be triggered only in response to some user action e.g. click
Note: Web share API is not supported on desktops and over non-HTTPS protocols. Hence, it is necessary to serve webpages over HTTPS in order to use it.
This method is supported by many browsers that are listed below:
- Chrome android (61+)
- Firefox android (79+)
- Opera android (48+)
- iOS Safari (12.2+)
- Samsung Internet (8.0+)