PWA-check: an automated PWA health check tool

dannymoerkerke1 pts1 comments

GitHub - pwa-today/pwa-check: An automated PWA health check tool · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

Uh oh!

There was an error while loading. Please reload this page.

pwa-today

pwa-check

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>16 Commits<br>16 Commits

bin

bin

src

src

tests

tests

.gitignore

.gitignore

.npmignore

.npmignore

LICENSE

LICENSE

README.md

README.md

package-lock.json

package-lock.json

package.json

package.json

View all files

Repository files navigation

pwa-check

Is your web app actually ready to be installed, work offline, and behave like a real PWA?

Let pwa-check check your app for you.

It scans the HTML, manifest, scripts, and service worker, then points straight at the gaps that will hurt installability or offline behavior.

What it checks

Web App Manifest

pwa-check finds a Web App Manifest in the HTML or in JavaScript that injects it dynamically, then checks the pieces that matter for installability:

scope

display

start_url

description

short_name

orientation

icons

screenshots

shortcuts

share_target

file_handlers

handle_links

It also checks whether referenced icons, screenshots, and shortcut icons are reachable, because broken assets make a PWA look unfinished.

Viewport meta tag

It checks for the viewport configuration a polished PWA should have:

width=device-width

initial-scale=1

viewport-fit=cover

If tokens are missing, the warning tells you exactly what is wrong.

iOS startup images

It checks whether the app defines iOS splash screens using apple-touch-startup-image links, so the first launch does not feel half-built.

These can be present in the HTML or injected by JavaScript.

Service worker

It checks whether the app registers a service worker and whether the worker does the work a PWA needs:

install handler

activate handler

fetch handler

push handler

notificationclick handler

caching behavior

It also supports Workbox-style service workers, including generated wrappers that load additional modules and precache assets.

Output

The CLI prints a list of results with one of three statuses:

pass

warn

fail

The process exits with a non-zero status if any fail result is found, so it fits cleanly into CI and local checks.<br>You can also make warnings fail the run, emit JSON, or set a timeout for each request.

Usage

Run it against a URL when you want a straight answer instead of guessing:

node bin/pwa-check.js https://example.com

or install it as a CLI tool:

npm i @pwa-today/pwa-check

then run:

npx pwa-check https://example.com

If you install the package globally:

npm i -g @pwa-today/pwa-check

or link it:

npm link @pwa-today/pwa-check

you can run it directly:

pwa-check https://example.com

Flags:

--json: emit machine-readable output

--fail-on-warn: treat warnings as failures

--timeout : cap each network request

Testing

Run the test suite with:

npm test

License

ISC. See LICENSE.

Notes

The checker uses heuristics for dynamic behavior, such as manifests or service workers injected by JavaScript.

A warn result means the app might still work, but it is leaving quality on the table.

A fail result means the app is missing a required piece and should not be treated as install-ready.

About

An automated PWA health check tool

Resources

Readme

License

ISC license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Custom properties

Stars

stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

JavaScript<br>100.0%

You can’t perform that action at this time.

check reload checks license json today

Related Articles