Closed himanshunaidu closed 2 months ago
This may end up causing a significant change in our setup, but I think if we want to host this anywhere, this will have to be taken into consideration.
I'd prefer if this specific version is hosted, since we are already putting in so much of collective effort into it.
Continuing this discussion on Telegram.
Currently, we are sending a request to the Node backend, every time we are progressing through the next pages in the books.
main.ejs
<button onClick="setResponseCookies(<%= JSON.stringify(response) %>)" hx-get="/scene/<%= response.target %>" hx-target="main" hx-swap="innerHTML"})"> <%= response.text %> </button>
This will add too much pressure on the backend since we will be sending requests for each new page. In theory, we could reduce this load, by only sending new requests for new books (or new chapters if we anticipate putting too much pressure on the browser by putting entire books into its localstorage).
But I am not aware of how to set this up seamlessly with the Server-Side Rendering / Single Page Application setup we have going currently. Maybe, if there is a way we can decide to swap the content in the frontend itself (maybe using Javascript).