A PWA is not a single HTML or PHP file. Whether a page opens “as a PWA” depends entirely on the manifest scope and the service worker, not on the file type. If you navigate inside the defined scope (e.g. /app/*), the page stays in the PWA window with the service worker active. As soon as a link points outside the scope (different path, subdomain, port, or absolute /), the app drops back to the normal browser. PHP vs HTML makes no difference – only the URL and scope matter.
How PWA navigation really works
Re: How PWA navigation really works
The Cache API only supports GET.
If you cache blindly in fetch, POST requests will crash your Service Worker.
Always filter by request.method === "GET".