jjak0b / express-service

Package ExpressJS server to run inside a ServiceWorker
https://jjak0b.github.io/express-service/dist/
0 stars 1 forks source link

Intrinsic constraints of the service worker #2

Open jjak0b opened 3 years ago

jjak0b commented 3 years ago

Considerating #1 Requests on the main page can be intercepted from the service worker only if the main url location of the page hasn't been changed. For example the service worker can't intercept an absolute url like /about instead of a ./about triggered by an anchor <a> tag if the service worker scope is outside of / like /dist.

These details must be considerated if the express-service application paths ( or REST APIs ) matters or need refactoring

jjak0b commented 3 years ago

This should be considerated if path is important like the gh-pages path constraint

jjak0b commented 3 years ago

Note: A way to avoid the gh-pages path constraint is by using the repo of the gihub user / organization like jjak0b.github.io so can be accesible through https://jjak0b.github.io/