Skip to content

Add a manifest option for the declaration the "version" of the web application #1036

Open
@songql

Description

@songql

Whether it is a Web Application or a PWA (Progressive Web Application), it is a type of Application. Generally, the difference from other operating systems and desktop applications is whether the installation or deployed on the server or the client. With the emergence of technologies such as HTML5 and WASM, and the development of frameworks such as NodeJS and Electron/NW.js, Web technologies are rapidly occupying the territory of client-side development. Additionally, both Google Play and Microsoft Store already support offline PWA installers.

Based on the above, as a type of Application, Web Application should also define version attributes in the develop standard just like applications of other operating systems.

We can refer to the version methods defined by other operating system applications to formulate the version identification of the Web Application:

Platform Host File Keys
MS Windows .exe resource.rc ProductVersion
Mac .app info.plist CFBundleShortVersionString, CFBundleVersion
iOS .ipa info.plist CFBundleShortVersionString, CFBundleVersion
Android .apk AndroidManifest.xml versionCode, versionName
Chrome Extension .crx manifest.json version
NodeJS package.json version

And lots of people are asking questions about the PWA version online, and all kinds of weird solutions like:

Therefore, it is proposed to add a version attribute member object in manifest. The member object contains two attributes, namely code and name, where: code is an integer, which is incremented according to the update of the Web Application; name is text, which can be set by the developer to any user-friendly string, such as 1.0.0.

Specific examples are as follows:

{
  "version": {
    "code": 1,
    "name": "v1.0.0"
  }
}

The defined version attribute can provide the Web Application with access capabilities through Web API also, which can be used in more scenarios that developers needed, such as version display in web applications, offline PWA upgrade detection, etc.

Only by providing developers with more capabilities, Web Applications will flourish in the application ecosystem. Let’s move forward step by step!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions