[WordPress] 外掛分享: Demfilz PWA

首頁 › 外掛目錄 › Demfilz PWA
WordPress 外掛 Demfilz PWA 的封面圖片
全新外掛
安裝啟用
—
尚無評分
2 天前
最後更新
—
問題解決
WordPress 5.6+ PHP 7.2+ v1.0.1 上架:2026-10-12

內容簡介

Demfilz PWA 將您的 WordPress 網站轉換為符合規範的漸進式網頁應用程式。啟用後,它提供網站應用程式清單、服務工作者、離線頁面及安裝提示,讓訪客能像應用程式一樣將網站加入主畫面。

【主要功能】
• 自動生成網站應用程式清單
• 提供服務工作者以支援離線功能
• 生成多種尺寸的應用程式圖示
• 顯示安裝提示以便訪客加入主畫面
• 支援 WooCommerce 和常見快取外掛
• 診斷工具檢查 PWA 準備狀態

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Demfilz PWA」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Demfilz PWA makes your WordPress site a compliant Progressive Web App the moment you activate it. It serves a web app manifest and a service worker from your site root, generates the icon sizes browsers require, adds an offline page in your colours, and offers visitors an “Install” banner so they can add your site to their home screen or desktop.
In plain terms: visitors can add your site to their home screen like an app. Pages they have already seen keep opening when they lose signal, and everything else shows a friendly offline page instead of a browser error.
What you get

Web app manifest with name, short name, description, start URL, scope, display mode, orientation, colours, language, categories, app shortcuts, screenshots for the richer install dialog, and 192 / 512 pixel icons (plus maskable variants).
Service worker served at your site root, so the whole site is in scope. Pages are fetched from the network first with an offline fallback; scripts and styles are refreshed in the background; images and fonts are cached with sensible caps; old caches are cleared automatically when you change settings; a list of pages you choose is stored in advance.
Offline page in your theme and background colours with Retry and Home buttons and a list of the pages available offline, stored when the worker installs, with a built-in fallback if that ever fails.
App icons generated from any image in your media library (512, 192, 180 and maskable sizes, padded on your background colour). Falls back to your Site Icon (also given maskable variants), then to a neutral placeholder, so the site is installable immediately.
Install banner (“Add to Home Screen”) shown after a configurable number of visits, with a snooze period. iPhone and iPad visitors get Share > Add to Home Screen instructions, since iOS has no install prompt.
Install button shortcode [dpwa_install_button], plus a data-dpwa-install attribute or a dpwa-install CSS class (handy for menu items) for your own buttons.
Offline indicator while the connection is down, and an optional “site updated, reload” notice.
Diagnostics on the settings screen: HTTPS, manifest, icons, service worker, offline page, home page tags, what anonymous visitors receive and registration are checked from your browser, and a Site Health test reports PWA readiness.
Safe by design: pages served to logged-in users, the WooCommerce cart, checkout and account pages, search results, previews, admin, REST and AJAX requests are never stored. Non-GET requests are never touched.

Compatible with WooCommerce (cart, checkout and account pages are recognised automatically), page builders (edit modes are excluded from caching) and the common caching and minifying plugins (the front-end script is excluded from combine and minify bundles).
Requirements
Your site must be served over HTTPS for browsers to register the service worker and offer installation (localhost and 127.0.0.1 are exempt for testing). Your theme must be mobile-friendly, which every modern theme is; the Status panel checks this for you.
Developer hooks

dpwa_manifest – filter the manifest array.
dpwa_service_worker_config – filter the worker configuration (bypass and no-store patterns, cache limits, precache list).
dpwa_bypass_patterns and dpwa_no_store_patterns – adjust the URL fragments the worker leaves alone or never stores.
dpwa_script_config – filter the front-end configuration (banner, strings).
dpwa_should_output – switch the manifest link, meta tags and script off for a request.
JavaScript: window.dpwa.canInstall(), window.dpwa.promptInstall(), window.dpwa.showBanner(); events dpwa:installable, dpwa:installed and dpwa:dismissed on document, plus matching dataLayer pushes when a dataLayer exists.

Privacy
This plugin does not connect to any external service and sends no data anywhere. The service worker stores copies of pages, scripts, styles, images and fonts in the visitor’s own browser cache, subject to the limits on the settings screen. If your theme already loads Google Fonts, the worker keeps those font files in the same browser cache so they render offline; it never requests them itself. The install banner remembers the visit count, dismissal time and installed state in the visitor’s browser storage (localStorage) so it does not nag. No cookies are set.

延伸相關外掛

文章
Filter
Mastodon