Technical improvements
Our application is in good shape, but several things should be kept in mind in case the application starts growing. Let’s take a look.
Server-side rendering and caching
There are several improvements we can make to further optimize how the public pages are rendered on the server.
Currently, we are rendering the pages on each request, which is good if the data changes frequently; otherwise, it might increase the loading time and server costs because rendering on the server is a compute-intensive operation.
Fortunately, Next.js supports another rendering strategy called Incremental Static Regeneration.
It works as follows:
- User1 requests a page.
- The server returns the cached version of the page and returns it.
- During that request, Next.js is triggered to regenerate the same page with the latest data.
- User2 requests a page.
- The server returns the new version of the page.
If we take our public job details page...