current position:Home>Differences, advantages and disadvantages between HTTP negotiation cache Etag and last modified

Differences, advantages and disadvantages between HTTP negotiation cache Etag and last modified

2022-04-29 13:07:59Shadow wind Mo

1、Etag and Last-Modified

Negotiate the cache by Etag and Last-Modified The control of the

Last-Modified It's through Last modification time To determine whether resources have changed

Etag It's used hash Content comparison to determine whether resources have changed

2、 Given the Last-Modified Why use Etag

  • Last-Modified With second In units of , If not more than 1s No resource sending changes will be detected in the .

  • Resources go through a life cycle and return to their original state , It hasn't changed , But the judgment will change .

  • because Etghash The value content is unique , By comparison, you can quickly know whether the resource sends changes .

copyright notice
author[Shadow wind Mo],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204291128440875.html

Random recommended