Icon requirements for web push notifications can vary by browser and how the icon is used. Here's a general guide:
General Icon Requirements:
- Publicly Accessible: The icon image file must be accessible via a direct, public URL.
- Secure Hosting (HTTPS): Icons, especially for Chrome push notifications, must be served over HTTPS. This is because service workers, which manage web push notifications, require secure origins.
- Reliable Hosting: It's recommended to host your icons on a reliable service, like a Content Delivery Network (CDN), to ensure they load quickly and reliably, particularly when sending notifications to many subscribers.
Browser-Specific Icon Requirements:
Safari:
- Safari requires a Website Icon for push notifications.
- Dimensions: This icon must be 256x256 pixels.
- Your push notification service provider typically includes this icon in the push package and may automatically resize it for various user interface elements.
Chrome (Mobile Badge Icon):
- These requirements apply specifically to the badge icon displayed on Chrome mobile push notifications.
- Dimensions: 72x72 pixels.
- Format: Must be a monochrome (single color) transparent image in .png format.
- Hosting: Requires HTTPS hosting.
- Note: It is not possible to customize the main Chrome browser logo that appears with push notifications on the desktop platform.
Comments
0 comments
Please sign in to leave a comment.