Simply record what is understood browser caching strategy:
1, according to the browser cache location point of view is divided into four categories: top-down priority order
1) Service Worker: Service Worker is running a separate thread behind the browser, can generally be used to implement caching feature.
This cache is the highest priority, and the other with three different, is customized cache, while the other three can be predetermined manner and timeliness memory by setting certain fields and the like,
Will (not sure if your browser's memory) to open up a separate space to do the cache, you can manually empty or exceed the browser automatically cleared in memory,
Service Worker is an additional script written by the developer, and cache location independent
2) memory cache: Memory cache
Memory cache, caches all the resources page
Life cycle tab same page, in addition to limited fields, such as no-store outside hardly controllable,
Automatically purges the oldest resources are on the same page resource is too large,
Optimizing their behavior in order to speed up the browser cache speed reading carried out, not the developers control and not be bound by the HTTP protocol header, it is regarded as a black box.
3) disk cache: hard disk cache
It is the main strength of our memory management,
Header field may be provided in response to a cache way determined expiration time, and the like, can view the corresponding data fields,
Including mandatory caching, caching negotiation are two kinds of negotiation will use the cache after cache invalidation generally strong, that forced the cache will give priority to negotiate cache,
Consultations cache invalidation will generally do a network request.
4) push cache: Push Cache
Is http2.0 content, priority request before the snare
2, Reference: To summarize some of the more important than
Read one article front-end cache: https://juejin.im/post/5c22ee806fb9a049fb43b2c5?utm_source=gold_browser_extension#heading-1
In-depth understanding of the browser cache mechanism: https://www.jianshu.com/p/54cc04190252