Earlier quoted context omitted.
If that's your concern it probably makes more sense to just be server-rendering at that point
My main concern is cost. Cloudflare workers are free.
Netlify Edge Functions: A new serverless runtime powered by Deno
161–166 of 166 posts
Re: Netlify Edge Functions: A new serverless runtime powered by Deno
#162Earlier quoted context omitted.
You can write Cloudflare Workers in WASM today. As far as I can tell from the outside, that's still "WASM-called-by-Javascript", and many of their JS optimizations don't work the same way. E.g. if a Worker calls JS `fetch` and returns that `Response`, they recognize that and remove the JS from the data path; same is not true for WASM at this time.
I think that optimization should still work when using Wasm, unless the Wasm code does something silly like manually pump the stream (read from one, write to the other), but I think you'd have to go out of your way to do that, and anyway the same is true of pure-JavaScript code.
Re: Netlify Edge Functions: A new serverless runtime powered by Deno
#163Earlier quoted context omitted.
> There must be a better way? You're experiencing friction trying to use something in a way that it's supposed to not be used. (I.e., click-tracking by junking up URLs.) You could look for an answer, or you could take a step back, evaluate your expectations, and then decide not to do what you're trying to do.
Unfortunately this is an enormous business and asking them to stop all tracking is well outside of my remit.
Re: Netlify Edge Functions: A new serverless runtime powered by Deno
#164Earlier quoted context omitted.
> There must be a better way? You're experiencing friction trying to use something in a way that it's supposed to not be used. (I.e., click-tracking by junking up URLs.) You could look for an answer, or you could take a step back, evaluate your expectations, and then decide not to do what you're trying to do.
Unfortunately this is an enormous business and asking them to stop all tracking is well outside of my remit.
Re: Netlify Edge Functions: A new serverless runtime powered by Deno
#165Earlier quoted context omitted.
The first link in the article points to this: https://www.netlify.com/products/#netlify-edge-functions How to use them Drop JavaScript or TypeScript functions inside an edge-functions directory in your project. Use cases Custom authentication, personalize ads, localize content, intercept and transform requests, perform split tests, and more.
> Use cases > A bunch of server functionality Why is that the use case? I don't see how an edge function can be faster than a centralized server endpoint if it has to reach out to literally any other component of the system involved in auth / persistence
Maybe it doesn't have to "reach out to literally any other component" Sometimes code can be self-contained. That's why they're called "Edge Functions" and not "Edge Services"
The advantage is edge functions are physically closer to the customer (lower latency) and can be updated at-will and all at once (unlike client-code, you cannot force a user to update their app).
Re: Netlify Edge Functions: A new serverless runtime powered by Deno
#166I would love to jump over to something like Vercel or Netlify Edge, but maddeningly none of these platforms give you control over the cache key. I have pages that are server-side rendered with Cache-Control headers, but because our visitors come with unique tracking params on the end of their URL (e.g. from Mailchimp or Branch), we would essentially have no cache hits. It seems the only way to have control over this…