theme-color, the manifest link, Apple touch icons (resized from the chosen attachment), the Apple web app tags when that setting is on, and lh-web-application-user: a short hash of the signed-in user ID, empty when logged out.media query for that screen, since iOS shows no startup screen without an image of exactly its size. Through an image CDN built on Jetpack’s (LH Image CDN), each is an exact-size crop of the original upload rather than WordPress’s scaled-down copy; the CDN never enlarges, so screens bigger than the original get no link. Served locally, a screen only gets a link when a crop of exactly its size exists./pwa-manifest.json and /serviceworker.script. The service worker is generated per site and served without authentication, so LiteSpeed can cache it; purge it after changing anything it contains.name, description (the tagline, left out when empty, both as plain text), lang and dir from the site settings, with scope / and an id hashed from the site. Browsers identify an installed app by its id, so how it is built must never change./offline/ showing the offline message. The offline page slug is reserved.start_url is the home page with ?lh_web_application-start_url=1, precached so the installed app opens offline.lh_web_application-script, deferred, in the footer); their data attributes are added on script_loader_tag.update where the browser supports it. The worker scripts of LH BuddyPress Live Content and LH Web Push Notifications handle it.lh_web_application-offline-{hash}: the offline page, precached on install. The name includes the offline message, so editing it makes the next worker refetch the page.lh_web_application-pages-{hash}: the start URL plus every same-origin HTML page viewed, network first. Kept however old, but capped at 300; when full, the least recently used page is dropped, never the start URL or the offline page. Never stored: wp-admin (including admin-ajax), /wp-json/, ?rest_route=, wp-login.php, URLs with a nonce parameter, and responses marked no-store.lh_web_application-images: cache first and kept however old, but capped at 150; when full, the least recently used image is dropped. Cross-origin images (Photon, Gravatar) are fetched by the worker in CORS mode so they can be cached; hosts without CORS still load, uncached. Responses marked no-store or private are skipped.lh_web_application-static: cache first, precached with the scripts and styles the site registers. URLs carry ?ver=, so a change is a new URL; files unused for 180 days are removed, so replaced versions age out.lh_web_application (at most one write per entry per day), and sweeps those caches when a new worker activates and at most once a day after that. Without IndexedDB nothing breaks: static files simply stay, and the images and pages caches drop the oldest added instead.lh-web-application-cached (the time it was saved), and the page shows a status bar and adds the body class lh_web_application-served-from-cache. The bar’s inline styling has zero specificity, so themes can restyle it.lh_web_application-* caches.manage_options): short name, manifest icon (and whether it is maskable), iOS icon and startup image, display mode, Apple web app capable, shortcut menu, theme and background colours (hex), and the offline message. Stored per site in lh_web_application-options. Icons fall back to the site icon, the background colour to the theme’s; emptying a colour or the offline message clears it.shortcuts; each of its items can have an icon (the Shortcut icon field on Appearance, Menus), stored in _lh_web_application-menu_icon-attachment_id post meta.lh_web_application_initial_run once on activation (flushes rewrites, generates icon sizes) and lh_web_application_ping_single_url, which rewarms the service worker, manifest, start URL and offline page after a page cache clear.Since 1.33.0 each job has its own class in includes/, loaded by plugin_init() behind the lh_web_application_init_plugin filter. Every class extends LH_web_application_plugin and is a singleton that hooks itself in its constructor.
lh-web-application.php (LH_web_application_plugin): identity (namespace, text domain, version from the header, file and asset paths), write_log(), plugin_init(), the script_loader_tag filter, and activation, deactivation (scheduling and clearing the cron events) and uninstall.LH_web_application_plugin and every child class: LH_web_application_options_trait (option, field and endpoint names, and the settings readers), LH_web_application_images_trait (icon and startup image sizes, including create_apple_startup_sizes(), and the image URL helpers) and LH_web_application_scripts_trait (script tag attributes shared by every class, and get_script_src_by_handle()).LH_web_application_manifest_class: the manifest JSON and shortcuts, and the /pwa-manifest.json endpoint.LH_web_application_service_worker_class: the /serviceworker.script endpoint (printed by partials/sw4.php), its unauthenticated request, the precache and import lists, and the page script lh_web_application-script with the fetch handler.LH_web_application_head_meta_class: the head tags, Apple touch icons, iOS startup images and the image sub-sizes they need.LH_web_application_menu_icon_class: the Shortcut icon field on Appearance, Menus.LH_web_application_offline_page_class: the virtual /offline/ page, the reserved slug and the login URL filter.LH_web_application_cron_class: the initial run and the rewarm after a page cache clear.LH_web_application_settings_class: Settings, Web Application.LH_web_application_app_install_class: the install sheet printed in the footer and its script assets/scripts/app_install-boot.js, the Install App menu item, the snooze admin-ajax action and the shortcode.LH_web_application_install_block_class: the Install the App block, registered from blocks/install-button/ (block.json, a no-build editor script and a small stylesheet) and rendered on the server.libraries/lh-admin-ajax-noncer-class.php provides the return_wp_nonce admin-ajax action.