3th of November 2019 - by Andrea Mazzilli.
In more than 2 decades of developing websites I came up with some rules that you should definitelly follow if you want to make your website faster. And when I say fast I mean the fastest possible. Keep reading and it will be clear how to improve your website performance.
Browsers already use cache to save time and not reload the same resource everytime (if it is the same). You can also use cache in your web server to be sure that when you ask for a resource your web server is going to give you the cached version instead of doing useless operations. So if you call an API to get the list of users, the server will perform some calculations and give back the result, but the next same request ( if in the meantime the db didn't change ) you can just immediately serve a cached response.
Images are really common in every website, unfortunately they can be really heavy compared to other web resources resulting in a bad user experience. The solution to this problem is to use the correct image format and size. Be sure you serve pictures in the JPEG2000 format and in the size your browser is going to render them.