PWA Opening in Bowser mode while offline

We built Progressive Web Appangular 4 from an existing project. Everything worked fine until we added a manifest file. When you open the application from a browser, you can add it to the main screen. But after adding, when you clicked on the icon from the main screen, it will open in Browser modeinstead Standalone mode.

I do not know why this is so, and what could be the problem. Bellow is my manifest.json file, please help me.

{
  "name": "Mobile Application",
  "short_name": "Mobile App",
  "icons": [
    {
      "src": "assets/icons/android-icon-36x36.png",
      "sizes": "36x36",
      "type": "image/png",
      "density": "0.75"
    },
    {
      "src": "assets/icons/android-icon-48x48.png",
      "sizes": "48x48",
      "type": "image/png",
      "density": "1.0"
    },
    {
      "src": "assets/icons/android-icon-72x72.png",
      "sizes": "72x72",
      "type": "image/png",
      "density": "1.5"
    },
    {
      "src": "assets/icons/android-icon-96x96.png",
      "sizes": "96x96",
      "type": "image/png",
      "density": "2.0"
    },
    {
      "src": "assets/icons/android-icon-144x144.png",
      "sizes": "144x144",
      "type": "image/png",
      "density": "3.0"
    },
    {
      "src": "assets/icons/android-icon-192x192.png",
      "sizes": "192x192",
      "type": "image/png",
      "density": "4.0"
    }
  ]
  "background_color": "#43a047",
  "theme_color": "#43a047",
  "display": "standalone",
  "start_url": "/index.html",
  "orientation": "portrait"
}
+2
source share
1 answer

There is probably something wrong with some other part of your application.

- - , JavaScript serviceworker, , JavaScript, , , 't , PWA.

, PWA.

Google Lighthouse : https://developers.google.com/web/tools/lighthouse/

, , , - Chrome . , , Chrome , , PWA.

+2

Source: https://habr.com/ru/post/1688187/


All Articles