Pages, Workers, Remix

I'm doing some development work on a website with Remix.

BACKGROUND

Remix does not use static rendering, but rather builds pages via server-side rendering. This is accomplished via a loader function that receives "get" requests.

I am planning on having dynamic content on the home page (text + images, all of which is currently slated to be stored in a simple .json file).

I will be selecting this content randomly whenever a request comes in. In essence, each load will randomly load one of eight possible stories.

QUESTIONS

A. What does this sort of dynamic content mean for my use of Cloudflare Pages / Workers?

  • It may seem obvious, but I am not sure if this means that every home page loader will trigger a Worker or not?
  • If a Worker is triggered, then my projected cost calculation is different than if it is not triggered?
B. Similarly, Remix action functions will receive mutations from each page (post, patch, delete...).

  • If I have a form on a page that sends a "post" method to one of my project's route actions, does that mean a Worker will be triggered to handle the action?
  • If so, this also means that my project's projected cost calculation will be different than if the Worker were not triggered?
Appreciate the clarifications — it's currently hard for me to understand the boundaries between Pages and Workers.

Understanding this could be an important factor in terms of the features I plan and the ways in which I write my code.
Was this page helpful?