WebAPK ignores display:standalone for PWA running on local network

256 views
Skip to first unread message

Fatih Coşkun

unread,
Aug 8, 2018, 10:01:49 AM8/8/18
to Chromium-discuss
In my project I am developing a PWA with a manifest "display" flag set to "standalone". During development this PWA is running on a server which is accessible on my local network only (not from outer internet).

During testing a2hs functionality in latest Android Chrome browser, I encountered the following strange behavior.

Add to Home Screen via simple Shortcut
When the PWA is added to the home screen as a simple shortcut , then everything seems to work fine. Clicking on the home screen shortcut will open the PWA in standalone mode without visible Chrome UI.

Add to Home Screen via WebAPK installation
When the the PWA is installed as a WebAPK, then the standalone flag seems to be ignored. When tapping on the home screen shortcut, the PWA will open in Chrome browser with visible Chrome UI.


In both cases I will trigger a2hs via Chrome browser's options menu item "Add to Home Screen". For testing the first case, the web manifest needs to be incomplete. It is sufficient to remove icons from the manifest. Otherwise the manifest is the same in both test cases. Depending on whether the manifest includes icons or not, the PWA will be added as a simple shortcut or WebAPK.

Why does the standalone flag not work in the second test case? A possible reason could be that my PWA is not accessible from outer internet, and hence Chrome servers cannot properly assemble the WebAPK. However this is just guessing on my part. Can someone confirm this reason?

domi...@chromium.org

unread,
Aug 9, 2018, 3:15:02 AM8/9/18
to Chromium-discuss
You are correct: WebAPKs cannot be generated for URLs not accessible to the wider internet.

Fatih Coşkun

unread,
Aug 9, 2018, 4:40:09 AM8/9/18
to Chromium-discuss

Meanwhile I got it to work. I had posted the same question on stackoverflow and was asked to try it with default ports. Indeed, with default ports, it started working via WebAPK.


> You are correct: WebAPKs cannot be generated for URLs not accessible to the wider internet.

Thanks for the reply. However, my successful test shows now that this does not seem to be the case. My PWA is installed as a WebAPK, although it is not accessible from wider internet. It is however accessible by the Chrome browser on my Android device (my wifi has access to my PWA server). It seems to be sufficient.
Reply all
Reply to author
Forward
0 new messages