# Desktop PWA works with Discourse!

**URL:** https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348
**Category:** Announcements
**Created:** [April 28, 2018, 2:23am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348 "2018-04-28T02:23:24Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 28, 2018, 2:23am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/1 "2018-04-28T02:23:25Z")

</div>

I remember getting pretty upset when [Chrome shutdown the app launcher](https://www.androidauthority.com/say-bye-chrome-app-launcher-704694/), this was a feature I used on quite a few sites.

Luckily thanks to work we have done for Android you can have it back now on your Discourse site.

Head to: `chrome://flags/#enable-desktop-pwas` , turn it on.

If you also want to capture links and send to the page enable `Desktop PWAs Link Capturing` and there is also some extra caching you can turn on.

Then, visit your Discourse site and click “Install to desktop..”

 ![image](https://global.discourse-cdn.com/meta/original/3X/6/f/6ff68e523b051ae74e51edbfed233557fddd3cb7.png)

You now have a dedicated application you can launch for your Discourse site.

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/5/45e532be5635e95adca2f96a55fc6fc5f5b28f7c.png)

Special thanks to @Falco and @featheredtoast for pushing us to support this fancy on Android cause now it pays off and we get it on desktop as well!

On Chrome on Mac the terminology is a bit different, but it works nonetheless.

It is important to note that this will not work with for you on all sites, you need a manifest and some fancy to support it.

**Note** This is definitely a big Electron killer for simple repackages given that it is stuck on Chrome 59 now.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 28, 2018, 3:02am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/2 "2018-04-28T03:02:11Z")

</div>

There are a few things I want to clean up here that I will do in a theme component.

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/9/a9a3e2f8b60afeb49ab23687938aa99c53e7c3df.png)

I think that in PWA desktop mode

- The title should be a static “Discourse meta” cause the text duplication here is really annoying

- Mini Profiler needs to find another spot cause it is really annoying there.

- Big logo seems too much visually

- A back button and refresh button would be nice

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/2/a250c0d0d4e2c3da2eef59e21a64bd0f58f73b9e.png)

Luckily we have `window.matchMedia('(display-mode: standalone)').matches` to detect if we are in this mode so its simple to make a component to clean this stuff up.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 28, 2018, 3:30am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/3 "2018-04-28T03:30:57Z")

</div>

> [@sam](#):
>
> Luckily we have window.matchMedia(‘(display-mode: standalone)’).matches to detect if we are in this mode so its simple to make a component to clean this stuff up.

One thing I played with a bit is adding stats like:

- Pageviews from PWA
- Installations

To the Discourse Admin Dashboard and/or Google Analytics.

We can detect pageviews with that media query and installs with:

```plaintext
window.addEventListener('beforeinstallprompt', function(e) {
  // beforeinstallprompt Event fired

  // e.userChoice will return a Promise.
  // For more details read: https://developers.google.com/web/fundamentals/getting-started/primers/promises
  e.userChoice.then(function(choiceResult) {

    console.log(choiceResult.outcome);

    if(choiceResult.outcome == 'dismissed') {
      console.log('User cancelled home screen install');
    }
    else {
      console.log('User added to home screen');
    }
  });
});

```

---

<div class="post-metadata">

### Author: ![DavidGNavas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidgnavas/32/68313_2.png) [@DavidGNavas](https://meta.discourse.org/u/DavidGNavas)
#### Post date: [April 28, 2018, 9:26am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/4 "2018-04-28T09:26:53Z")

</div>

Super cool feature! 🤩

> [@sam](#):
>
> It is important to note that this will not work with for you on all sites, you need a manifest and some fancy to support it

Is it planned to support this feature in hosted instances?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 28, 2018, 9:52am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/5 "2018-04-28T09:52:40Z")

</div>

Oh it works on all **discourse** sites (hosted by us or self hosted), as long as you are on beta and up and have https enabled and enforced

Try it on random sites on the Internet and you will have less luck, Twitter does not work, mattermost does not and the list goes on

---

<div class="post-metadata">

### Author: ![DavidGNavas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidgnavas/32/68313_2.png) [@DavidGNavas](https://meta.discourse.org/u/DavidGNavas)
#### Post date: [April 28, 2018, 10:11am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/6 "2018-04-28T10:11:51Z")

</div>

Thanks! 🙂

> [@DavidGNavas](#):
>
> Is it planned to support this feature in hosted instances?

I meant on Discourse-hosted sites. I tried on Meta and the desktop app works perfect, but in our site [https://brain.goodrebels.com/](https://brain.goodrebels.com/) the desktop app opens a new tab in Chrome. Perhaps we have to wait a bit for the latest update? or change some settings in /admin?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 28, 2018, 10:13am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/7 "2018-04-28T10:13:40Z")

</div>

Hmm 🤔 we will investigate this cc @Falco @featheredtoast

I wonder if this is related to your site requiring login

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [April 28, 2018, 10:39am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/8 "2018-04-28T10:39:19Z")

</div>

> [@sam](#):
>
> I wonder if this is related to your site requiring login

Worked for me on our require-logon site, FWIW

* * *

This is pretty interesting stuff. What are the advantages / disadvantages of using Discourse this way? I’d love to hear folks thoughts on this.

I know very little about this, so I’m just speaking based on what I saw in 2 min.

Wired: It’s really easy now to open the app now with Spotlight on Mac  
Tired: I can only have one tab open

Wired: I can brag about how we have an app now (kinda)  
Tired: I can only have one tab open

… you get the idea. 🙂

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 28, 2018, 10:59am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/9 "2018-04-28T10:59:42Z")

</div>

Yeah IMO this is kind of pointless. It’s like a web browser.. but _worse!_

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 28, 2018, 2:29pm UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/10 "2018-04-28T14:29:10Z")

</div>

Yeah I get that, I would find this more useful if there was only 1 discourse site I visited and if the icon on the desktop taskbar updated with notifications. But, I float between lots of sites so for me there is more limited use unless I had an app to bind all my sites, and even then lack of tabs is a big pain.

For chat (eg slack, mattermost) I find this very useful which is why I actually started this research. If my job was to moderate a single Discourse site I would also find this useful.

So yeah, I do not think this will be for everyone, but for some it may be handy, especially if there was some value add in the taskbar.

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [April 28, 2018, 2:33pm UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/11 "2018-04-28T14:33:49Z")

</div>

I think it _could_ work well, but it would take some additional work on the design of the UI. For instance, in Slack, you don’t need browser tabs because the navigation between channels is built into the app as a first class citizen. Maybe similar things could be done with theme components, where the UI could be designed _within_ these new constraints.

That might work very well for many of our users who do fit into this mode for the most part:

> [@sam](#):
>
> I would find this more useful if there was only 1 discourse site I visited

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 22, 2019, 4:08am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/12 "2019-03-22T04:08:56Z")

</div>

How does this relate to the instructions at

> [@Implement Badging API](https://meta.discourse.org/t/implement-badging-api/111631/2):
>
> Here’s how to test this in Windows on Chrome (latest version 73, just released today): go to the three dots menu at the upper right in Chrome select More Tools → Create Shortcut tick the “Open as window” checkbox select Create Like so I’ll try it out .. it works!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 22, 2019, 4:14am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/13 "2019-03-22T04:14:51Z")

</div>

[![](https://global.discourse-cdn.com/meta/original/4X/8/2/d/82db6f6f0a10c35064708c941a2b61fd910780d1.jpeg "loggins & messina - same old wine - Sittin' In") ](https://www.youtube.com/watch?v=-5Xn0rqfypU)

Same old wine in a brand new bottle.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 22, 2019, 4:16am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/14 "2019-03-22T04:16:03Z")

</div>

Oh this topic was focusing on the ability to install Discourse in Desktops (which is no longer experimental).

The other one was mostly about the experimental Badging API. To use the Badging API you need to install to desktop, so this one here is a pre-requirement.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 22, 2019, 4:18am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/15 "2019-03-22T04:18:57Z")

</div>

First post looks quite wrong though? If it is not “experimental” where is that chrome menu item??

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 22, 2019, 4:21am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/16 "2019-03-22T04:21:07Z")

</div>

Yeah this is totally out of date, no point carrying this topic anymore.

> [@sam](#):
>
> A back button and refresh button would be nice

Is a very big killer here usability wise. Now that his is official we should write a proper theme component to make PWA work as expected.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 22, 2019, 4:28am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/17 "2019-03-22T04:28:20Z")

</div>

There is one here:

> [@Back button in iOS PWA](https://meta.discourse.org/t/back-button-in-ios-pwa/93909/45):
>
> Here’s a back/forward component I threw together. I used @media to make it appear since ‘Mobile’ doesn’t work for an ipad. This was developed for an app so it has no way to detect iOS PWA. I’d be happy to add it if anyone has ideas. [https://github.com/davidkingham/mobile-navigation/](https://github.com/davidkingham/mobile-navigation/) I found a snippet on this page, but my skills are lacking to implement it.

Looks like it’s aimed at mobile iOS.

> [@codinghorror](#):
>
> First post looks quite wrong though? If it is not “experimental” where is that chrome menu item??

To get the menu entry in Chrome we must enable the service worker in desktop.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 22, 2019, 4:57am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/18 "2019-03-22T04:57:21Z")

</div>

> [@Falco](#):
>
> To get the menu entry in Chrome we must enable the service worker in desktop.

Yes but the tradeoff is that service worker adds a ton of support emails to our work.. did you want to whitelist the service worker for Chrome and Firefox or something like that @sam in addition to Android?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 22, 2019, 5:00am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/19 "2019-03-22T05:00:26Z")

</div>

> [@codinghorror](#):
>
> whitelist the service worker for Chrome and Firefox or something like that @sam in addition to Android?

I think we should whitelist Chrome now … hold off on whitelisting Firefox till this is done:

> **[1407202 - (desktop-pwa) \[Meta\] Desktop Progressive Web App Support](https://bugzilla.mozilla.org/show_bug.cgi?id=1407202)**
>
> RESOLVED (nobody) in Firefox - General. Last updated 2025-09-18.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 22, 2019, 5:01am UTC](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348/20 "2019-03-22T05:01:43Z")

</div>

Ok @falco can you do the needful on whitelist? We already whitelist Chrome / Android as I recall.

[Next page](https://meta.discourse.org/t/desktop-pwa-works-with-discourse/86348.md?page=2)
