Hacker News new | ask | show | jobs
by ifwinterco 4 days ago
Yeah this pattern can be made to work fine.

Main downside is it significantly complicates the front end code compared to just waiting for FE to sync with BE before updating

1 comments

What if we had a local server running on the same PC, which then relays the request to some shared server on the internet?
That's what a background worker is: a local server managed by the browser and only accessible to pages of the origin domain.
I'm thinking using a local http-server instead of web-workers . The local http server would do all the server-logic except also passing data that needs to be shared to a non-local server.