MSEdgeExplainers

Installed Web App window title (application-title)

(formerly HTML Document Subtitle)

Authors: Diego Gonzalez

Status of this Document

This document is a starting point for engaging the community and standards bodies in developing collaborative solutions fit for standardization. As the solutions to problems described in this document progress along the standards-track, we will retain this document as an archive and use this section to keep the community up-to-date with the most current standards venue and content location of future work and discussions.

Introduction

Installed web apps cannot provide dynamic/controllable contextual information in their title bar. Contextual information can be the name of an open document, the section of an app or any other information that can be relevant to the running installed PWA. Having this information in the title bar can be useful to identify the open window when selecting among open apps in surfaces like the Alt+Tab action on Windows (and similar actions on macOS and Linux to jump between open apps).

The current behavior is that an installed web application will put the app's name from the manifest and append the page’s inner text from the <title> HTML tag in the head of the page. This often can create awkward titles for some web apps. For instance, some social networking apps change the title of the page to the content it is displaying itself, creating a title that is often too long and not good to identify the installed web app window. See the image below as reference:

image of twitter installed web app with a long text in the title bar

We want to fix the text that appears on the title bar by giving developers control over the information that appears there. Generally, applications utilize the text in the title bar of the window to specify the application's name and any other contextual information that is important to identify the window in the corresponding's platform UX. As an example, most word processors and image editors would display the name of the application and the name of the document or file that is being edited.

To fix this situation, we require a bucket to store this contextual information. Considering that this information is generally different from what is displayed in the page's title, we propose adding an application-title definition that can be used for this specific purpose. The source of the title bar in installed web apps would be composed of the app's name as defined in the manifest, and an additional contextual/detail from a meta tag in the head of the document.

Goals

Non-Goals

Use Cases

This will allow developers 2 cases for the standard title bar.

  1. Installed web apps that only have the app’s name as define in the manifest file.
    • Useful to replicate some native experiences that only have the app’s name in the title bar (This is the default behaviour for web apps that do not specify the application-title meta tag or set the content to a blank or empty string).
  2. Installed Web Apps that have the app’s name and a application-title or detail as defined in the document’s meta tag.
    • Useful for apps that can have multiple instances running with several documents open, such as word processors.

Proposed Solution

As defined in the HTML specification, “meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements”. This is the case for the type of information we want to convey in the particular and novel case of text in the title bar of an installed web app/tab in browser. Following the guidelines of usage for own metadata names, there can be processing requirements for the UA so a new standard name needs to be added to the existing list.

<meta name="application-title" content="additional/secondary text to go in the title bar">

The following image is a mockup of a PWA using the application-title meta-tag.

image of twitter installed web app with a long text in the title bar

This is achieved by adding the following meta tag in the head of the page:

<meta name="application-title" content="Direct Messages">

Privacy and Security Considerations

The TAG privacy and security self-review is located here.

Considered Alternatives

Open Questions