web
Last updated
Was this helpful?
Last updated
Was this helpful?
/ High Performance Browser Networking
中文版第一章 中文翻译目录
Web perfornamce Make cache your friend: Static assets must be cached with a far future expiration (CSS, JS, images). If it changes, you can change the URL, such as styles-v2.css, styles.css?v2, styles.css?20180102, etc. Cache expiration: explicit (preferred, absolute or relative, e.g. 5 days later), or implicit (set by browser, usually it checks the age of the asset and calculate a relative value). If cache hit but expired, browser would ask the server if modified. preload: high priority. prefetch: try to guess the next move of the user/session. low priority. no guarantee. Resource Hints: (in memory, off the screen, pr is probability). Start an action on mousedown (0.1s) or hover (desktop, 0.2s).
CORS
三次握手 四次挥手