I am serving Angular app as a static content in Express Server. When serving static files with Express, Express by default adds ETag to the files. So, each next request will first check if ETag is matched and if it is, it will not send files again. I know that Service Worker works similar and it tries to match the hash. Does anyone know what is the main difference between these two approaches (caching with ETag and caching with Service Workers), and when we should use one over the other? What would be the most efficient when it comes to performance:
- Server side caching and serving Angular app static files
- Implementing Angular Service Worker for caching
- Do both 1 and 2
from Serving Angular app as a static content in Express Server
No comments:
Post a Comment