cheatsheet1999 / FrontEndCollection

Notes for Fullstack Software Engineers. Covers common data structure and algorithms, web concepts, Javascript / TypeScript, React, and more!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTML5 offline storage mechanism

cheatsheet1999 opened this issue · comments

Users are online

When the browser finds manifest attribute on HTML head, it will request the manifest file.

  • If this is the first time visiting,

    • Then the browser will download the corresponding resources and store data based on the manifest file.
  • If not the first time visiting,

    • Then the browser will use the offline resource to load the page, then compares the old manifest file with the new manifest file, and update the manifest file if needed

Users are offline

  • The offline storage of HTML5 is based on a .appcache file. It works somehow like Cookie, which means web data will be downloaded and show the web data when users are offline