Live data from Hacker News

Cloudflare Workers: Run JavaScript Service Workers at the Edge

blog.cloudflare.com

131–134 of 134 posts

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#132
post #123

So, can I use this to do this: Render your SPA (different index.html) when a login cookie is set and otherwise render your landing page (yet another index.html)? - Such that that my http://example.com can always be cached (unless it needs to hit the server where the same logic is implemented). And in general, how do you manage your landing page vs. your SPA?

Maybe I’m not quite understanding what you’re asking, but I think you can do this with client side service workers already.

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#134
post #133

This is really cool! I wonder if this will become the new "S3 API" and get everyone to copy^H^H^H^H implement it. Also a little concerned about writing anything substantial without an onprem version!

Yes, it's my hope that Service Workers will be recognized broadly as the standard API for this.

FWIW I've seen several different folks saying they're working on implementing a Service Workers API shim on top of Node, which would be a great way to get an on-prem version, and should not be very hard to do.

Post reply on HN