A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.chrome.com/docs/devtools/progressive-web-apps below:

Debug Progressive Web Apps | Chrome DevTools

Use the Application panel to inspect, modify, and debug web app manifests, service workers, and service worker caches.

Progressive Web Apps (PWAs) are modern, high quality applications built using web technology. PWAs offer similar capabilities to iOS, Android, and desktop apps. They are:

This guide only discusses the Progressive Web App features of the Application panel. If you're looking for help on the other panes, check out the last section of this guide, Other Application panel guides.

Summary Web app manifest

If you want your users to be able to add your app to their the Applications folder on Mac OS X, the Start menu on Windows, and the home screen on Android and iOS, you need a web app manifest. The manifest defines how the app appears on the home screen, where to direct the user when launching from home screen, and what the app looks like on launch.

Once you've got your manifest set up, you can use the Manifest tab of the Application panel to inspect it.

In addition, if DevTools encounters an error, such as an icon that cannot be loaded, the Manifest tab displays an Installability section describing the error.

View and check maskable icons

The Icons section of the Manifest tab displays all the icons of your application. In this section, you can also check safe areas for maskable icons, the format of icons that adapt to platforms.

To trim the icons so that only the minimum safe area is visible, check Show only the minimum safe area for maskable icons.

If your entire logo is visible in the safe area, you're good to go.

Trigger installation

Chrome makes it possible for you to enable and promote the installation of your PWA directly within its user interface. Learn How to provide your own in-app installation experience.

To trigger the installation flow of your PWA:

  1. Open the PWA's landing page in Chrome.
  2. On the right side of the address bar at the top, click Install.

  3. Follow the on-screen instructions.

Key point: Keep the Console drawer open when you trigger installation. The Console tells you if your manifest has any issues and logs other information about the installation lifecycle.

The Install app feature cannot simulate the workflow for mobile devices. Notice how the desktop Chrome browser displays the installation button in the address bar, even though DevTools is in Device Mode. However, if you can successfully add your app to your desktop, then it'll work for mobile, too.

If you want to test out the genuine mobile experience, you can connect a real mobile device to DevTools via remote debugging. To trigger the installation on the connected mobile device, open the three-dot menu and click Install app.

Inspect shortcuts

App shortcuts let you to provide quick access to a handful of common actions that users need frequently.

To inspect the shortcuts you defined in your manifest file, scroll to the Shortcut #N sections of the Manifest tab.

Note: Note: This screenshot is taken from this demo page. Inspect it for more examples. Inspect screenshots for a richer installation UI

When you add a description and a set of screenshots to your manifest file, your app gets a richer installation dialog.

To inspect the screenshots, scroll to the Screenshot #N sections of the Manifest tab.

Test URL protocol handler registration

PWAs can handle links that use a specific protocol for a more integrated experience. To learn how to create a handler, see URL protocol handler registration for PWAs.

To test your handler:

  1. Open DevTools on the landing page of your PWA. For example, check out this demo PWA.
  2. From the demo page, install the PWA and reload the app after the installation. The browser has now registered the PWA as a handler for the web+coffee protocol.
  3. In the Application > Manifest > Protocol Handler section, enter the URL you want the handler to test and click Test protocol. In this example, the handler can process americano, chai, and latte-macchiato.
  4. When Chrome asks you if it can open the app, confirm by clicking Open Protocol Handler.
  5. In the next dialog, allow the app to handle web+coffee links.

If the handler successfully processes the link, you'll see an image of a coffee cup opened in the app.

Service workers

Service workers are a fundamental technology in the future web platform. They are scripts that the browser runs in the background, separate from a web page. These scripts enable you to access features that don't need a web page or user interaction, like push notifications, background sync, and offline experiences.

Related Guides:

The Service Workers tab in the Application panel is the main place in DevTools to inspect and debug service workers.

If the service worker causes any errors, the Service Workers tab shows an Error icon with the number of errors next to the Source line. The link with the number takes you to the Console with all the logged errors.

To see information on all service workers, click See all registrations at the bottom of the Service Workers tab. This link takes to chrome://serviceworker-internals/?devtools where you can further debug your service workers.

Service worker caches

The Cache Storage tab provides a read-only list of resources that have been cached using the (service worker) Cache API.

Note that the first time you open a cache and add a resource to it, DevTools might not detect the change. Reload the page and you should see the cache.

If you've got two or more caches open, you'll see them listed below the Cache Storage drop-down.

Quota usage

Some responses within the Cache Storage tab may be flagged as being "opaque". This refers to a response retrieved from a different origin, like from a CDN or remote API, when CORS is not enabled.

In order to avoid leakage of cross-domain information, there's significant padding added to the size of an opaque response used for calculating storage quota limits (i.e. whether a QuotaExceeded exception is thrown) and reported by the navigator.storage API.

The details of this padding vary from browser to browser, but for Google Chrome, this means that the minimum size that any single cached opaque response contributes to the overall storage usage is approximately 7 megabytes. You should keep this in mind when determining how many opaque responses you want to cache, since you could easily exceeded storage quota limitations much sooner than you'd otherwise expect based on the actual size of the opaque resources.

Related Guides:

Clear storage

The Clear Storage tab is a very useful feature when developing progressive web apps. This tab lets you unregister service workers and clear all caches and storage with a single button click. Check out the section below to learn more.

Related Guides:

Other Application panel guides

Check out the guides below for more help on the other panes of the Application panel.

Related Guides:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4