The File Web Share Target API is a new, powerful feature in Chrome Canary that allows web apps to receive files (like images) shared from other apps, much like native apps. This post details how I implemented this API on my blog, enabling direct image uploads from my Android camera app. The process involves declaring support for file sharing in your web app manifest and handling the incoming file data in a service worker. The API uses a progressive approach, leveraging standard form POST requests, making integration relatively simple. This feature significantly enhances web app integration with the host operating system, closing the gap between web and native apps.
The Web Share Target API is now available as an origin trial in Chrome, bridging the gap between web and native apps. Previously, only native apps could register as share targets, limiting the web's ability to seamlessly integrate with system-level sharing functionalities. This new API empowers installed web apps to receive shared content, opening up exciting possibilities for web developers. The API's potential is highlighted by Twitter's early adoption and my own experimentation with a custom manifest.json file. While file support is still pending, the future looks bright for effortless content sharing between web and native environments.
This post discusses the importance of using push notifications responsibly in Progressive Web Apps (PWAs). It highlights the negative impact of intrusive notification prompts and emphasizes the need for providing context and respecting user preferences. The post links to a helpful article and video by Thomas Steiner that provides further guidance on best practices for web push notifications, including avoiding immediate prompts and clearly communicating the value and frequency of notifications.
This post discusses Progressive Web Apps (PWAs) and why companies like Microsoft and Google are embracing them. While PWAs offer instant access to content and cross-device compatibility, a key concern is their isolated nature, making it difficult for them to share data and resources. This contradicts the core principles of the web, which should be linkable and interoperable. The increasing isolation of PWAs, along with the broken functionalities of basic web operations like copy/paste and drag/drop, contributes to the creation of unintended data silos on the modern web.
PWACompat is a JavaScript library that helps web developers make their Progressive Web Apps (PWAs) compatible across different browsers. It takes the existing Web App Manifest and generates the necessary meta and link tags for features like icons, favicons, startup mode, and colors, ensuring a consistent experience across browsers, even those with less complete PWA support, like Safari on iOS. PWACompat simplifies cross-browser compatibility for PWAs, handling things like splash screens and other add-to-homescreen features, making it a valuable tool for PWA developers.
I explored building a progressively enhanced sharing web component using Shadow DOM. My focus was on URL visibility and manipulation within web apps, even when they behave like native applications. The component is designed to be customizable and work across browsers, with or without JavaScript, by leveraging existing elements like anchor tags. It uses a Twitter intent as a fallback sharing mechanism when Web Components aren't supported. I'm excited about the potential of web components, even without widespread custom element support.