getAlby / website

DEPRECATED - no longer in use
https://getalby.com
2 stars 10 forks source link

Add cache headers #125

Closed bumi closed 1 year ago

bumi commented 2 years ago

How can we enable cache-control headers and cache the page on Cloudflare?

https://github.com/getAlby/website/commit/b949a29b6bd247d679502eb2f5bb4927fae59824

I had it enabled but it seems some JS files have not been found in the cached version and the Install button is not shown - the install button is done on the client.

when does remix generate the client JS? what do we need to know to enable cache-control headers with remix

dylancom commented 2 years ago

The client JS is generated upon building the app for production:

npm run build

After that it can be served:

npm start

There is currently an error message to the install button though. Not sure if this is related... (ClientOnly expects a function but gets a component directly) Should be: return <ClientOnly>{() => <Install style={style} />}</ClientOnly>;

jankoegel commented 1 year ago

We're soon shutting down this repo. Decided against keeping Remix in our tech stack.