Is the browser cache controlled by the back end or the front end?

Baidu has a general understanding of the strong caching and negotiation caching of browser caches. It feels as if the server is set back, and the front-end code does not need to be set. Is the browser cache really set on the server side, and does the front end normally adjust the interface request like this?

Oct.05,2021

is indeed a server setting, but the front end also needs to know how to set it.
it is up to the front end to determine which resources are cached, how to cache them, and how to update them.
in addition to browser caches, there are also local caches, storage, indexedDB, etc. In the future, you have to know all about service workers, before you can decide which cache is more suitable for current business needs.


the front end can also be set (in the meta), and the back end can be set (in the response header), depending on the specific business needs. For example, if there are several H5 display pages on the mobile side, I think it is fine to set them uniformly on the server; but if it is an official website or a page with compound functions, it is OK to set it at the front end or at the back end. You don't have to write this into the code, but you still need to understand it. (it's best to learn the basic process of HTTP,. Just look at the "schematic HTTP"), which will be helpful in understanding the business and the overall architecture.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb8aab-484b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb8aab-484b8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?