process

The browser is going to ask for the resource if there’s no direct request in the cache and see if it’s expired, if it’s not, use it, if it’s expired ask the server if the resource is consistent, consistent 304, inconsistent 200 Cache the new resource

Strong cache

  • expire

The disadvantage of the server expiration time is that the client is not allowed to change the time

  • cache-control

No-store No cache No-cache Negotiation cache Public Proxy service enabling cache Private Proxy server no cache max-age Stores the remaining expiration time

  • priority

Cache-control takes precedence over expire

Negotiate the cache

  • With last last-modified – modify – since

Disadvantages: Unit is second, change within a second cannot be identified

  • With the if the etag – none – match

Disadvantages: Slow eTAG generation on the server

  • priority

etag>last-modifed