Web Push notifications in Firefox

වෙබ් Push මගින් වෙබ් අඩවි සදහා නව පනිවිඩ හො යාවත්කාලින අන්තර්ගතයට භාවිතා කරන පරිශීලකයන් හට දෙනුම් දෙනු ලබනවා.Firefox විවෘත කල කාලය අතරතුර, අවසර ලබාදී ඇති වෙබ් අඩවි මගින් ඔබෙ බ්රවුසරය වෙත notification එවිය හැකි අතර එවා ඔබෙ තිරය මත ප්රදර්ශනය කළ හැක. පරිශීලකයන් හට මෙම notification අක්‍රිය කිරිම හෝ ඒ සදහා ඉඩ ලබාදීම පහසුවෙන් සිදුකල හැකි අතර මෙම notification පෙනෙන ආකාරය පාලනය කල හැක.

වැඩි දීයුනු කල Notifications

version 44 ආරම්භ වන විට, එම වෙබ් අඩවිය load වන්නේ නැති විට පවා Firefox තිරය මත notification ලබාදීමට හැකියාව ඇත.මෙම push API භාවිතා කරමින්,W3C standard, ඕනෑම අවස්ථාවක Firefox වෙත push message ලැබෙන අතර notification පෙන්විය හැක (පරිශීලකයා විසින් අවසර දී ඇත්නම්). අඩවි වලට පවා ඔබට notificationb නොපෙන්වා පසුබිමේ දත්ත යාවත්කාලීන කිරීමට Push භාවිතා කළ හැකිය. ඔබ මේ වන විටත් notification යැවීමට වෙබ් අඩවියක් සඳහා අවසර ලබා දී ඇත්නම් , එම වෙබ් අඩවියට Push API භාවිතා කිරීමට හැකි වනු . ඔබට මේ උපදෙස් අනුගමනය කරමින් notification යැවීමට වෙබ් අඩවියක් සඳහා අවසර ලබා දිය යුතු ද නැත් ද යන්න තෝරා ගත හැක:

  1. Click the Site Info button icon to bring up the Site Information panel.
  2. Click the menu next to Permissions and choose a notification option: Always Ask, Allow, Block.

Web Push යනු කුමක්ද?

Web Push is an optional feature that allows websites to send you messages even when the site isn’t loaded. Sites can use this feature to provide you with notifications or update data in the background.

For instance, you can subscribe to notifications from your favorite shopping websites which can notify you of new promotions or offers. You can subscribe to notifications from different websites. A concert site may offer you notifications for shows of your favorite band; you allow that site to notify you, and a week later you get a notification that your band is on tour.

You will only receive messages from sites for which you have granted permission.

How does it work?

Websites can install a Service Worker, a background web page with a limited set of functionality, that can subscribe to the push service. The website can then send a push message through Mozilla’s Web Push service to your browser, which can process that message and display a notification on your screen.

push notification 44

Clicking the notification can open a website or switch to that site’s tab if loaded.

What information do I share with a website?

A website that has been granted permissions can send you push messages when the site isn’t loaded. A quota limits the number of push messages without an on-screen notification that sites can send you. Websites that exceed the quota will have its push messaging disabled and the user must revisit the website again to resubscribe. Web Push does not directly allow websites to determine your IP address.

What information does Firefox use to provide Web Push?

Firefox maintains an active connection to a push service in order to receive push messages as long as it is open. The connection ends when Firefox is closed. On our server we store a randomized identifier for your browser, along with a randomized identifier for each site you authorize.

On Firefox for desktop, the push service is operated by Mozilla. Firefox for Android uses a combination of the Mozilla Web Push service and Google’s Cloud Messaging platform to deliver notifications to Firefox for Android.

In both cases, push messages are encrypted per the IETF spec and only your copy of Firefox can decipher them. The encrypted messages are stored on the server until they are delivered or expire.

How do I revoke Web Push permissions from a specific site?

Web Push is always opt-in in Firefox. A site cannot send you push messages without your permission. To stop a specific site from sending you push messages:

  1. Go to the Firefox menu New Fx Menu and select OptionsPreferences.
  2. Select the Content panel and click the Choose… button under Notifications.
  3. Select the site.
  4. Click Remove Site.

To stop all sites from sending you push messages, follow the above steps except, instead of selecting a specific site, click Remove All Sites. Websites will not be able to send you messages and will need to ask your permission to send them in the future.

How do I add Web Push to my website?

The Push API specification explains how to create a Service Worker and send push messages.

Was this article helpful?

Please wait...

These fine people helped write this article:

Illustration of hands


Grow and share your expertise with others. Answer questions and improve our knowledge base.

Learn More