This forum is a discussion about improving the "Use the Troubleshooting Information page to help fix Firefox issues" article. If you'd like to participate, please register.

If you need help with Firefox, please ask a question.

[Fx40] Registered Service Workers - about:serviceworkers

  1. Hi, in "Application Basics" exist the "Registered Service Workers - about:serviceworkers", from 41.x or before that ?

    we have to add that in article

    thanks

    Hi, in "Application Basics" exist the "Registered Service Workers - about:serviceworkers", from 41.x or before that ? we have to add that in article thanks
  2. ideato said

    Hi, in "Application Basics" exist the "Registered Service Workers - about:serviceworkers", from 41.x or before that ? we have to add that in article thanks

    Not sure if that entry was in fx40 (I'd have to reinstall fx40 and test) but it has to do, in part, with Push Notifications, which came up in the Permissions Manager article discussion: https://support.mozilla.org/en-US/kb/permissions-manager-give-ability-store-passwords-set-cookies-more/discuss/6304 [Fx 40] default permissions need update for "Receive Push Notifications".

    Background:


    https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API ^ Service workers essentially act as proxy servers that sit between web applications, and the browser and network (when available.) They are intended to (amongst other things) enable the creation of effective offline experiences, intercepting network requests and taking appropriate action based on whether the network is available and updated assets reside on the server. They will also allow access to push notifications and background sync APIs.

    https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers ^ Firefox Nightly: Go to about:config and set dom.serviceWorkers.enabled to true; restart browser.

    https://hacks.mozilla.org/2014/06/serviceworkers-and-firefox/ ^ Since Service Workers run in the “background”, they open up several possibilities for the Web that were previously only available on native platforms. Apart from the networking capabilities provided by the base specification, Service Workers are intended to be used by the Push API and the Background Sync API to deliver messages from the user-agent to web applications.

    The inimitable Jake Archibald has written a tool to easily see the status of Service Worker implementations. You can follow along with the gecko implementation via the meta bug.


    I found this page for testing:

    https://mobiforge.com/design-development/web-push-notifications ^ Service workers are a key part of getting push notifications up and running. They offer offline capabilities by providing a way for a web page to run scripts in the background without having the page open. This makes it possible to build rich offline experiences previously only possible with native apps. For a good tutorial on service workers, see this article on HTML5Rocks. <snip> Web push notifications example

    To set up web notifications on this website we'll need an interface to manage whether a visitor is subscribed or not. We'll use a simple checkbox for this. For the impatient, the finished result is live below. If your browser doesn't support push or service workers, then you won't be able to view the example. Sorry! Chrome is the only stable browser to use this with right now, although it's already available in Firefox nightly builds.


    When I visited the page, it said, "ServiceWorker not supported :-(" in the example paragraph. , I set dom.serviceWorkers.enabled to true in about:config, then I restarted Firefox 41. When I next visited https://mobiforge.com/design-development/web-push-notifications I was able to register a service worker in the example and set up a push notification by checking the box: mobiForge notifications Receive push notifications for new content

    about:serviceworkers showed the following: [[Image:RegisteredServiceWorkers]]

    RegisteredServiceWorkers

    After using the "Unregister" button, about:serviceworkers showed this: "No Service Workers registered."

    After resetting dom.serviceWorkers.enabled to false, it showed: "Service Workers are not enabled."

    ''ideato [[#post-12581|said]]'' <blockquote> Hi, in "Application Basics" exist the "Registered Service Workers - about:serviceworkers", from 41.x or before that ? we have to add that in article thanks </blockquote> Not sure if that entry was in fx40 (I'd have to reinstall fx40 and test) but it has to do, in part, with Push Notifications, which came up in the [[Permissions Manager - Give certain websites the ability to store passwords, set cookies and more|Permissions Manager]] article discussion: https://support.mozilla.org/en-US/kb/permissions-manager-give-ability-store-passwords-set-cookies-more/discuss/6304 [Fx 40] default permissions need update for "Receive Push Notifications". Background: ----- https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API ^ ''Service workers essentially act as proxy servers that sit between web applications, and the browser and network (when available.) They are intended to (amongst other things) enable the creation of effective offline experiences, intercepting network requests and taking appropriate action based on whether the network is available and updated assets reside on the server. They will also allow access to push notifications and background sync APIs.'' https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers ^ ''Firefox Nightly: Go to about:config and set dom.serviceWorkers.enabled to true; restart browser.'' https://hacks.mozilla.org/2014/06/serviceworkers-and-firefox/ ^ ''Since Service Workers run in the “background”, they open up several possibilities for the Web that were previously only available on native platforms. Apart from the networking capabilities provided by the base specification, Service Workers are intended to be used by the Push API and the Background Sync API to deliver messages from the user-agent to web applications.'' ''The inimitable Jake Archibald has written a tool to easily see the [https://jakearchibald.github.io/isserviceworkerready/ status of Service Worker implementations]. You can follow along with the gecko implementation via the [https://bugzilla.mozilla.org/show_bug.cgi?id=903441 meta bug].'' ----- I found this page for testing: https://mobiforge.com/design-development/web-push-notifications ^ ''Service workers are a key part of getting push notifications up and running. They offer offline capabilities by providing a way for a web page to run scripts in the background without having the page open. This makes it possible to build rich offline experiences previously only possible with native apps. For a good tutorial on service workers, see '''[http://www.html5rocks.com/en/tutorials/service-worker/introduction/ this article on HTML5Rocks]'''.'' <snip> ''Web push notifications example'' ''To set up web notifications on this website we'll need an interface to manage whether a visitor is subscribed or not. We'll use a simple checkbox for this. For the impatient, the finished result is live below. If your browser doesn't support push or service workers, then you won't be able to view the example. Sorry! Chrome is the only stable browser to use this with right now, although it's already available in Firefox nightly builds.'' ----- When I visited the page, it said, "ServiceWorker not supported :-(" in the example paragraph. , I set dom.serviceWorkers.enabled to true in about:config, then I restarted Firefox 41. When I next visited https://mobiforge.com/design-development/web-push-notifications I was able to register a service worker in the example and set up a push notification by checking the box: mobiForge notifications Receive push notifications for new content about:serviceworkers showed the following: <nowiki>[[Image:RegisteredServiceWorkers]]</nowiki> ;[[Image:RegisteredServiceWorkers]] After using the "Unregister" button, about:serviceworkers showed this: "No Service Workers registered." After resetting dom.serviceWorkers.enabled to false, it showed: "Service Workers are not enabled."

    Modified by AliceWyman on

  3. P.S. I added [Fx41(fx40?)] to the thread title and set up a Needs change entry, [Fx41(fx40?)] Need new screenshot showing Registered Service Workers - about:serviceworkers in Application Basics and description - see discussion

    P.S. I added [Fx41(fx40?)] to the thread title and set up a Needs change entry, [Fx41(fx40?)] Need new screenshot showing Registered Service Workers - about:serviceworkers in Application Basics and description - see discussion
  4. Here's a new screenshot for fx41 : [[Image:Fx41aboutsupport]] <snip> ... and here's fx40, which also has a "Registered Service Workers" entry: [[Image:Fx40aboutsupport]]

    Fx40aboutsupport

    Here's about:serviceworkers in Firefox 40 after setting dom.serviceWorkers.enabled to true in about:config then visiting https://mobiforge.com/design-development/web-push-notifications [[Image:RegisteredServiceWorkers-fx40]]

    RegisteredServiceWorkers-fx40

    Still need to come up with a description under Application Basics: (we'll make it either {for fx40} or {for fx41}) {for fx40}

    • Registered Service Workers: Clicking on about:serviceworkers will show you ....
    Here's a new screenshot for fx41 : <nowiki>[[Image:Fx41aboutsupport]]</nowiki> <snip> ... and here's fx40, which also has a "Registered Service Workers" entry: <nowiki>[[Image:Fx40aboutsupport]]</nowiki> ;[[Image:Fx40aboutsupport]] Here's about:serviceworkers in Firefox 40 after setting dom.serviceWorkers.enabled to true in about:config then visiting https://mobiforge.com/design-development/web-push-notifications <nowiki>[[Image:RegisteredServiceWorkers-fx40]]</nowiki> ;[[Image:RegisteredServiceWorkers-fx40]] Still need to come up with a description under Application Basics: <s>(we'll make it either {for fx40} or {for fx41})</s> {for fx40} * '''Registered Service Workers''': Clicking on ''about:serviceworkers'' will show you ....

    Modified by AliceWyman on

  5. I made a new revision that's still pending, to add new image for fx40. I also removed outdated content for versions previous to fx29.

    Still need a description for Registered Service Workers. I was thinking of this? {for fx40}

    • Registered Service Workers: Clicking on about:serviceworkers will show you whether or not the Service Workers feature is enabled and if any current Worker URLs are registered. Service workers are used for web enhancements such as push notifications.

    {/for}

    Does anyone have a better description? If not I'll add this one.

    I made a new revision that's still pending, to add new image for fx40. I also removed outdated content for versions previous to fx29. Still need a description for Registered Service Workers. I was thinking of this? {for fx40} * '''Registered Service Workers''': Clicking on ''about:serviceworkers'' will show you whether or not the [https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API Service Workers] feature is enabled and if any current Worker URLs are registered. Service workers are used for web enhancements such as [https://mobiforge.com/design-development/web-push-notifications push notifications]. {/for} Does anyone have a better description? If not I'll add this one.

    Modified by AliceWyman on

  6. P.S. Both dom.serviceWorkers.enabled and dom.push.enabled are currently set to "false" by default but that may change when Firefox 43 is released. Related bug: Bug 1208560 - Unship service workers and push notifications in Firefox 42

    P.S. Both ''dom.serviceWorkers.enabled'' and ''dom.push.enabled'' are currently set to "false" by default but that may change when Firefox 43 is released. Related bug: [https://bugzilla.mozilla.org/show_bug.cgi?id=1208560 Bug 1208560] - Unship service workers and push notifications in Firefox 42
  7. AliceWyman said

    P.S. Both dom.serviceWorkers.enabled and dom.push.enabled are currently set to "false" by default but that may change when Firefox 43 is released. Related bug: Bug 1208560 - Unship service workers and push notifications in Firefox 42

    Confirm, in 43 is true already.

    AliceWyman said

    Still need a description for Registered Service Workers. I was thinking of this? {for fx40}
    • Registered Service Workers: Clicking on about:serviceworkers will show you whether or not the Service Workers feature is enabled and if any current Worker URLs are registered. Service workers are used for web enhancements such as push notifications.
    {/for} Does anyone have a better description? If not I'll add this one.

    +1, also do you think is it wise to mention the change to True to the dom.serviceWorkers.enabled and dom.push.enabled, to have the Service Workers feature active from 41 ? in case someone see the article and want that feature ? probably not.... let's leave it as you said and in we can change that in 43.

    ''AliceWyman [[#post-12603|said]]'' <blockquote> P.S. Both ''dom.serviceWorkers.enabled'' and ''dom.push.enabled'' are currently set to "false" by default but that may change when Firefox 43 is released. Related bug: [https://bugzilla.mozilla.org/show_bug.cgi?id=1208560 Bug 1208560] - Unship service workers and push notifications in Firefox 42 </blockquote> Confirm, in 43 is true already. ''AliceWyman [[#post-12602|said]]'' <blockquote> Still need a description for Registered Service Workers. I was thinking of this? {for fx40} * '''Registered Service Workers''': Clicking on ''about:serviceworkers'' will show you whether or not the [https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API Service Workers] feature is enabled and if any current Worker URLs are registered. Service workers are used for web enhancements such as [https://mobiforge.com/design-development/web-push-notifications push notifications]. {/for} Does anyone have a better description? If not I'll add this one. </blockquote> +1, also do you think is it wise to mention the change to True to the dom.serviceWorkers.enabled and dom.push.enabled, to have the Service Workers feature active from 41 ? in case someone see the article and want that feature ? probably not.... let's leave it as you said and in we can change that in 43.
  8. ideato said

    +1, also do you think is it wise to mention the change to True to the dom.serviceWorkers.enabled and dom.push.enabled, to have the Service Workers feature active from 41 ? in case someone see the article and want that feature ? probably not.... let's leave it as you said and in we can change that in 43.

    I'd rather not mention specifics about preferences in this article and just leave it as I wrote it in my pending revision. If we find a good blog post or other information about service workers and push notifications when Firefox 43 comes out, we can link to it then. Who knows, Joni might have an article in the pipeline.

    ''ideato [[#post-12604|said]]'' <blockquote> +1, also do you think is it wise to mention the change to True to the dom.serviceWorkers.enabled and dom.push.enabled, to have the Service Workers feature active from 41 ? in case someone see the article and want that feature ? probably not.... let's leave it as you said and in we can change that in 43. </blockquote> I'd rather not mention specifics about preferences in this article and just leave it as I wrote it in my pending revision. If we find a good blog post or other information about service workers and push notifications when Firefox 43 comes out, we can link to it then. Who knows, Joni might have an article in the pipeline.

    Modified by AliceWyman on

  9. The current description is, {for fx40}

    • Registered Service Workers: Clicking on about:serviceworkers will show you whether or not the Service Workers feature is enabled and if any current Worker URLs are registered. Service workers are used for web enhancements such as push notifications.

    The "push notifications" link goes to https://mobiforge.com/design-development/web-push-notifications but I was wondering if we should change it to https://www.mozilla.org/firefox/push/ which is what we link to for "push notifications" in the Permissions Manager and Page Info articles. https://www.mozilla.org/firefox/push/ mentions "workers" under the section, How does it work?. I'll set up a "Needs change" entry to review.

    Also, Joni and tanvi are working on a new article, Web Push notifications in Firefox, which is based on https://www.mozilla.org/en-US/firefox/push/ and bug 1209992 (the bug is about consolidated permission for Push and Web Notifications landing in Fx 44).

    The current description is, {for fx40} * '''Registered Service Workers''': Clicking on ''about:serviceworkers'' will show you whether or not the [https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API Service Workers] feature is enabled and if any current Worker URLs are registered. Service workers are used for web enhancements such as [https://mobiforge.com/design-development/web-push-notifications push notifications]. The "push notifications" link goes to https://mobiforge.com/design-development/web-push-notifications but I was wondering if we should change it to https://www.mozilla.org/firefox/push/ which is what we link to for "push notifications" in the [[Permissions Manager - Give certain websites the ability to store passwords, set cookies and more|Permissions Manager]] and [[Page Info window - View technical details about the page you are on|Page Info]] articles. https://www.mozilla.org/firefox/push/ mentions "workers" under the section, ''How does it work?''. I'll set up a "Needs change" entry to review. Also, Joni and tanvi are working on a new article, [[Push notifications in Firefox]], which is based on https://www.mozilla.org/en-US/firefox/push/ and [https://bugzilla.mozilla.org/show_bug.cgi?id=1209992 bug 1209992] (the bug is about ''consolidated permission for Push and Web Notifications landing in Fx 44'').
  10. AliceWyman said

    The "push notifications" link goes to https://mobiforge.com/design-development/web-push-notifications but I was wondering if we should change it to https://www.mozilla.org/firefox/push/ which is what we link to for "push notifications" in the Permissions Manager and Page Info articles. https://www.mozilla.org/firefox/push/ mentions "workers" under the section, How does it work?. I'll set up a "Needs change" entry to review.

    I think yes, it is correct decision, also the https://www.mozilla.org/firefox/push/ article is more understandable to most people, who want more information will surely be able to find in the web.

    ''AliceWyman [[#post-12749|said]]'' <blockquote> The "push notifications" link goes to https://mobiforge.com/design-development/web-push-notifications but I was wondering if we should change it to https://www.mozilla.org/firefox/push/ which is what we link to for "push notifications" in the [[Permissions Manager - Give certain websites the ability to store passwords, set cookies and more|Permissions Manager]] and [[Page Info window - View technical details about the page you are on|Page Info]] articles. https://www.mozilla.org/firefox/push/ mentions "workers" under the section, ''How does it work?''. I'll set up a "Needs change" entry to review. </blockquote> I think yes, it is correct decision, also the https://www.mozilla.org/firefox/push/ article is more understandable to most people, who want more information will surely be able to find in the web.
  11. I made a new pending revision to change the push notifications link to https://www.mozilla.org/firefox/push/

    I made a new pending revision to change the push notifications link to https://www.mozilla.org/firefox/push/
  12. AliceWyman said

    I made a new pending revision to change the push notifications link to https://www.mozilla.org/firefox/push/

    Done, NOT L10 ready (because IMO Underpass is correct). We can do that in a couple of days :-) EDIT: after 42 stable release :-)

    ''AliceWyman [[#post-12756|said]]'' <blockquote> I made a new pending revision to change the push notifications link to https://www.mozilla.org/firefox/push/ </blockquote> Done, NOT L10 ready (because IMO [https://support.mozilla.org/en-US/forums/l10n-forum/711618?last=67190#post-67182 Underpass is correct]). We can do that in a couple of days :-) '''EDIT''': after 42 stable release :-)

    Modified by ideato on