Sounds like this could be a pretty trivial way to load balance React prerendering. As long as the react code fetches all data in 1 call it should be at least as efficient as doing it all in Nodejs on your server.
Cloudflare Workers: Run JavaScript Service Workers at the Edge
121–130 of 134 posts
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#122Earlier quoted context omitted.
Yes, your worker can make subrequests to other domains, and serving some assets out of S3 is a use case we specifically want to enable. I haven't looked into how specifically to expose HTTP Push in the API but that certainly seems like something we should support.
Please, add support HTTP/2 push! This is very, very awesome work. My team has been working on enabling the PRPL pattern[1] and differential serving on a few platforms, and edge caching has been a problem. We've tried to use Vary: User-Agent, but that leads to low cache hits. This API would let us to much smarter UA sniffing at the edge. From there we just need to parse some responses like JS and HTML, to be able to p…
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#123Render 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?
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#124This is probably the best annoucement of a new feature I have ever read. It makes an analogy to an existing technology. It provides a clear description of the new feature. It provides clear examples of how to use the new feature with a link to a sandbox so you can run and modify the examples. And it explains the thought process behind the implementation. In additon, I didn't notice a single typo, spelling or grammar…
> I didn't notice a single typo JavaScript is spelled incorrect all over the place. Awesome feature and post!
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#125Earlier quoted context omitted.
Please, add support HTTP/2 push! This is very, very awesome work. My team has been working on enabling the PRPL pattern[1] and differential serving on a few platforms, and edge caching has been a problem. We've tried to use Vary: User-Agent, but that leads to low cache hits. This API would let us to much smarter UA sniffing at the edge. From there we just need to parse some responses like JS and HTML, to be able to p…
Http/2 push is interesting here. Beyon static assists I wonder about read API orchestration or equivalent of graghQL on edge. I.e a single request comes in and it's broken apart against catchable resources and pushed back to the client from cache where possible.
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#126So, 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?
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#127Is this similar to Amazon's Lambda@Edge?
Sounds like it. I think Cloudflare's edge (no pun intended) is going to be their 110+ locations to host this. As opposed to Amazon's 93 I believe? (If all cloudfront spots support lambda@edge that is) https://aws.amazon.com/cloudfront/details/