当前位置:网站首页>Browser cache execution process
Browser cache execution process
2022-06-13 00:11:00 【PS cool tutorial】
HTTP Fields related to page caching in the protocol , Let's meet first :
| header | explain |
|---|---|
| Expires | Cache expiration date and time |
| Cache-Control | Set cache related configuration information |
| Last-Modified | Last modification time of the requested resource |
| ETag | The current value of the entity tag of the request variable , For example, the file MD5 value |

(1) The user sends a request to the server through the browser for the first time to obtain data , The client has no corresponding cache , So you need to send request Request to get data ;
(2) After the server receives the request , After obtaining the data of the server and the permission of the server cache , return 200 And attach the corresponding resources and cache information on the response header ;
(3) When the user accesses the same resource again , The client will search the cache directory of the browser for the existence of the response cache file
(4) If the corresponding cache file is not found , Then go (2) Step
(5) If there is a cache file , Next, judge whether the cache file is expired , The criterion of expiration is (Expires),
(6) If it doesn't expire , Then directly return data from the local cache for display
(7) If Expires Be overdue , Next, you need to determine whether the cache file has changed
(8) There are two criteria for judging , One is ETag(Entity Tag), One is Last-Modified
(9) The judgment result is that there is no change , The server returns 304, Get data directly from the cache file
(10) If the judgment has changed , Get data from the server again , And negotiate according to the cache ( Whether the server needs to set the cache data ) To cache data .
边栏推荐
- PMP test experience
- Binary search the specified number of numbers in the array binary advanced
- Start of u-boot S analysis (IV)
- SAP 业务技术平台(BTP) Workflow(工作流)功能介绍
- 华为云会议初体验【华为云至简致远】
- VHDL programming experiment exercises collection
- Introduction to business rules service on SAP Business Technology Platform (BTP)
- Enterprise wechat H5_ Authentication, PC website, enterprise wechat scanning code, authorized login
- TypeError: wave.ensureState is not a function
- Online examination questions for September examination of financial management
猜你喜欢
随机推荐
APISpace 空号检测API接口 免费好用
在 Golang 中构建 CRUD 应用程序
How leaflet gracefully displays the bubble window of overlapping points
SAP Business Technology Platform (BTP) workflow function introduction
[matlab] basic operation
Free lottery --- PMP renewal PDU | PMP knowledge map
2022美容师(技师)上岗证题目及答案
2022 operation of simulated examination platform for hoisting machinery command certificate
【Matlab】基础知识
Leaflet that supports canvas Path. Dashflow dynamic flow direction line
leaflet中如何通过透明度控制layerGroup的显示隐藏
PLC也能制作小遊戲----Codesys編寫猜數字小遊戲
array
分公司能与员工签劳动合同么
【Matlab】矩阵
How to publish OSM maps locally and customize the mapping
[matlab] matrix
【Matlab】基础运算
Vscode实现PHP在浏览器实时预览
scala中的隐式转换和隐式参数讲解与实践








