How PWA navigation really works

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
Post Reply
User avatar
Otto
Posts: 7020
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 100 times
Been thanked: 91 times
Contact:

How PWA navigation really works

Post by Otto »

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.

User avatar
Otto
Posts: 7020
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 100 times
Been thanked: 91 times
Contact:

Re: How PWA navigation really works

Post by Otto »

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".

Post Reply