When using Node to write a website, you need to
footerSuch as public parts as separate files, used in other pages
includeForm loading. Then how to transfer the data to these templates when other pages are loaded is more convenient. Do you need to query every page? Is there a simpler plan?
Since it is a public part, it must only be requested once. I know that the include loading template file of angularjs is loaded asynchronously by xhr, and it is cached directly in the browser. next time you use it, it will be ok. the express framework of nodejs is the same principle. personally, you can solve this problem in the same way.